diff options
Diffstat (limited to 'packages/Python/lldbsuite/test/expression_command/two-files/main.m')
-rw-r--r-- | packages/Python/lldbsuite/test/expression_command/two-files/main.m | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/expression_command/two-files/main.m b/packages/Python/lldbsuite/test/expression_command/two-files/main.m new file mode 100644 index 0000000..3f57383 --- /dev/null +++ b/packages/Python/lldbsuite/test/expression_command/two-files/main.m @@ -0,0 +1,22 @@ +#import <Foundation/Foundation.h> +#include <stdio.h> + +extern int AddElement (char *value); +extern char *GetElement (int idx); +extern void *GetArray(); + +int +main () +{ + NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + + int idx = AddElement ("some string"); + void *array_token = GetArray(); + + char *string = GetElement (0); // Set breakpoint here, then do 'expr (NSArray*)array_token'. + if (string) + printf ("This: %s.\n", string); + + [pool release]; + return 0; +} |