Debugger thread dump confusion
Debugger thread dump confusion
- Subject: Debugger thread dump confusion
- From: Chris Smith <email@hidden>
- Date: Mon, 28 Aug 2006 23:28:17 +0100
Hi,
I am a new XCode (and Macs!). I've am moving from developing
software in C# on Windows to Objective-C/Cocoa on Mac in an effort to
make my years of Microsoft wrongs right. I'm an old school UNIX guy
so I'm not new to UNIX/C.
In the never ending quest to learn to use Xcode, I've written some
code that intentionally blows up in a Foundation project in XCode 2.4
on 10.4.7 Intel.
int main (int argc, const char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSString *user = NSFullUserName;
printf("%s\n", [user UTF8String]);
[pool release];
return 0;
}
When I run this in the debugger it bombs with a SIGSEGV.
Unfortunately the debugger isn't returning the symbols (even though
the configuration is Debug and the properties are showing that
debugging symbols are generated) so the thread dump is looking like:
0 - objc_msgSend
1 - ??
2 - start
Everything source view is in x86 assembly so I don't know where the
SIGSEGV was generated in the objective C code. Clicking the "1 - ??"
is also in x86 assembly.
Any ideas how to find the offending code (even though I know it's a
duff reference when the UTF8String message is sent to the null ref
user)? Shouldn't it show:
0 - objc_msgSend
1 - main
2 - start
And when I click on main it should show me the code and where it blew?
Either that or am I being completely thick?
I'm starting simple so I know how the stuff works before hammering
out some real code!
Cheers,
Chris Smith
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden