2 #include <objc/Object.h>
4 @interface BasicClass: Object
12 - (int) printNumber: (int)number;
13 - (const char *) myDescription;
16 @interface BasicClass (Private)
20 @implementation BasicClass
46 - (int) printNumber: (int)number
48 printf("%d\n", number);
52 - (const char *) myDescription
54 return "BasicClass gdb test object";
59 @implementation BasicClass (Private)
66 int main (int argc, const char *argv[])
69 obj = [BasicClass new];
74 const char *_NSPrintForDebugger(id object)
76 /* This is not really what _NSPrintForDebugger should do, but it
77 is a simple test if gdb can call this function */
78 if (object && [object respondsTo: @selector(myDescription)])
79 return [object myDescription];