mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 01:28:46 +00:00
The gdb.objc tests haven't compiled in years. This patch fixes this, based on a comment in bug 31671. I don't know whether this approach works with the clang implementation of Objective-C. However, it does work with GCC, provided that gnustep-base is installed.
40 lines
441 B
Objective-C
40 lines
441 B
Objective-C
#include <stdio.h>
|
|
#include <Foundation/NSObject.h>
|
|
|
|
@interface NonDebug: NSObject
|
|
{
|
|
}
|
|
@end
|
|
@interface NonDebug2: NSObject
|
|
{
|
|
}
|
|
@end
|
|
|
|
@implementation NonDebug
|
|
|
|
- someMethod
|
|
{
|
|
printf("method someMethod\n");
|
|
return self;
|
|
}
|
|
|
|
@end
|
|
@implementation NonDebug2
|
|
|
|
- someMethod
|
|
{
|
|
printf("method2 someMethod\n");
|
|
return self;
|
|
}
|
|
|
|
@end
|
|
|
|
|
|
int main (int argc, const char *argv[])
|
|
{
|
|
id obj;
|
|
obj = [NonDebug new];
|
|
[obj someMethod];
|
|
return 0;
|
|
}
|