OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gdb/] [gdb-6.8/] [gdb-6.8.openrisc-2.1/] [gdb/] [testsuite/] [gdb.objc/] [objcdecode.m] - Diff between revs 24 and 33

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

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

powered by: WebSVN 2.1.0

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