Little tweak to ease debugging ... get compiler to know the class of the

_internal pointer and generate information so gdb can access the internal
cass without needing a cast.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34425 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2012-01-05 20:40:12 +00:00
parent 1a85fb0780
commit 997222976b
6 changed files with 27 additions and 18 deletions

View file

@ -75,6 +75,14 @@ typedef NSUInteger NSXMLNodeKind;
// Output options
// NSXMLNodePrettyPrint
/* This next class declaration is private for internal use by the base
* library developers ... it is present simply to make the compiler
* produce symbol information to be used when debugging.
*/
#if defined(GSInternal)
@class GSInternal;
#endif
/**
* The most primitive unit in an XML document.
*/
@ -89,10 +97,16 @@ typedef NSUInteger NSXMLNodeKind;
* when we don't have the non-fragile ABI available.
* Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details).
* In this case it's declared protected so that the NSXMLNode
* subclasses can share the same variables.
* In this case, when compiled the variable is a protected class
* available so that the NSXMLNode subclasses within the base library
* can share the same variables, but when viewed from outside the
* base library itsself, it's an opaque pointer which must not be used.
*/
@protected id _internal GS_UNUSED_IVAR;
# if defined(GSInternal)
@protected GSInternal *_internal GS_UNUSED_IVAR;
# else
@private id _internal GS_UNUSED_IVAR;
# endif
#endif
}

View file

@ -24,10 +24,9 @@
#import "common.h"
#import "NSXMLPrivate.h"
#define GSInternal NSXMLDTDInternal
#include "GSInternal.h"
#import "NSXMLPrivate.h"
#import "GSInternal.h"
GS_PRIVATE_INTERNAL(NSXMLDTD)
@implementation NSXMLDTD

View file

@ -24,10 +24,9 @@
#import "common.h"
#import "NSXMLPrivate.h"
#define GSInternal NSXMLDTDNodeInternal
#include "GSInternal.h"
#import "NSXMLPrivate.h"
#import "GSInternal.h"
GS_PRIVATE_INTERNAL(NSXMLDTDNode)
@implementation NSXMLDTDNode

View file

@ -24,10 +24,9 @@
#import "common.h"
#import "NSXMLPrivate.h"
#define GSInternal NSXMLDocumentInternal
#include "GSInternal.h"
#import "NSXMLPrivate.h"
#import "GSInternal.h"
GS_PRIVATE_INTERNAL(NSXMLDocument)
#import <Foundation/NSXMLParser.h>

View file

@ -24,10 +24,9 @@
#import "common.h"
#import "NSXMLPrivate.h"
#define GSInternal NSXMLElementInternal
#include "GSInternal.h"
#import "NSXMLPrivate.h"
#import "GSInternal.h"
GS_PRIVATE_INTERNAL(NSXMLElement)
@implementation NSXMLElement

View file

@ -24,10 +24,9 @@
#import "common.h"
#import "NSXMLPrivate.h"
#define GSInternal NSXMLNodeInternal
#include "GSInternal.h"
#import "NSXMLPrivate.h"
#import "GSInternal.h"
GS_PRIVATE_INTERNAL(NSXMLNode)