OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gdb-7.1/] [gdb/] [testsuite/] [gdb.objc/] [objcdecode.m] - Blame information for rev 387

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 227 jeremybenn
#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
 
25
int
26
multipleDef()
27
{
28
  printf("function multipleDef\n");
29
  return 0;
30
}
31
 
32
int main (int argc, const char *argv[])
33
{
34
  id obj;
35
  obj = [Decode new];
36
  multipleDef();
37
  [obj multipleDef];
38
  return 0;
39
}
40
 
41
const 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
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.