1 #include <objc/Object.h>
3 @interface BasicClass: Object
11 - (int) printNumber: (int)number;
12 - (const char *) myDescription;
15 @interface BasicClass (Private)
19 @implementation BasicClass
45 - (int) printNumber: (int)number
47 printf("%d\n", number);
51 - (const char *) myDescription
53 return "BasicClass gdb test object";
58 @implementation BasicClass (Private)
65 int main (int argc, const char *argv[])
68 obj = [BasicClass new];
73 const char *_NSPrintForDebugger(id object)
75 /* This is not really what _NSPrintForDebugger should do, but it
76 is a simple test if gdb can call this function */
77 if (object && [object respondsTo: @selector(myDescription)])
78 return [object myDescription];