1#include <objc/Object.h>
2
3@interface Decode: Object
4{
5}
6- multipleDef;
7- (const char *) myDescription;
8@end
9
10@implementation Decode
11
12- multipleDef
13{
14  printf("method multipleDef\n");
15  return self;
16}
17
18- (const char *) myDescription
19{
20  return "Decode gdb test object";
21}
22
23@end
24
25int
26multipleDef()
27{
28  printf("function multipleDef\n");
29  return 0;
30}
31
32int main (int argc, const char *argv[])
33{
34  id obj;
35  obj = [Decode new];
36  multipleDef();
37  [obj multipleDef];
38  return 0;
39}
40
41const char *_NSPrintForDebugger(id object)
42{
43  /* This is not really what _NSPrintForDebugger should do, but it
44     is a simple test if gdb can call this function */
45  if (object && [object respondsTo: @selector(myDescription)])
46    return [object myDescription];
47
48  return NULL;
49}
50