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:
rfm 2012-01-05 20:40:12 +00:00
parent b4c0707ab6
commit 1780a56fb4
6 changed files with 27 additions and 18 deletions

View file

@ -75,6 +75,14 @@ typedef NSUInteger NSXMLNodeKind;
// Output options // Output options
// NSXMLNodePrettyPrint // 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. * 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. * when we don't have the non-fragile ABI available.
* Use this mechanism rather than changing the instance variable * Use this mechanism rather than changing the instance variable
* layout (see Source/GSInternal.h for details). * layout (see Source/GSInternal.h for details).
* In this case it's declared protected so that the NSXMLNode * In this case, when compiled the variable is a protected class
* subclasses can share the same variables. * 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 #endif
} }

View file

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

View file

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

View file

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

View file

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

View file

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