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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gdb/] [gdb-6.8/] [gdb/] [testsuite/] [gdb.objc/] [objcdecode.m] - Rev 25

Compare with Previous | Blame | View Log

#include <objc/Object.h>
 
@interface Decode: Object
{
}
- multipleDef;
- (const char *) myDescription;
@end
 
@implementation Decode
 
- multipleDef
{
  printf("method multipleDef\n");
  return self;
}
 
- (const char *) myDescription
{
  return "Decode gdb test object";
}
 
@end
 
int
multipleDef()
{
  printf("function multipleDef\n");
  return 0;
}
 
int main (int argc, const char *argv[])
{
  id obj;
  obj = [Decode new];
  multipleDef();
  [obj multipleDef];
  return 0;
}
 
const char *_NSPrintForDebugger(id object)
{
  /* This is not really what _NSPrintForDebugger should do, but it
     is a simple test if gdb can call this function */
  if (object && [object respondsTo: @selector(myDescription)])
    return [object myDescription];
 
  return NULL;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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