Files
binutils-gdb/gdb/testsuite/gdb.objc/nondebug.m
Tom Tromey df25394884 Make the gdb.objc tests compile
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.
2025-12-02 09:22:45 -07:00

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;
}