Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugger thread dump confusion



Hi,

Thanks for the info. I had a feeling it was something not right. I assume, from your comment, that this works fine on PPC? I'll grab a G4 or something off eBay to test against I think!

Bug being raised now.

Many Thanks,

Chris Smith

On 28 Aug 2006, at 23:55, Jim Ingham wrote:

The problem here is that objc_msgSend is an odd little goober of hand-written assembly, and figuring out the caller when you crash in such a place is tricky. We get it right on ppc, but not on Intel, apparently.

This is a bug. Can you file a bug at http://bugreporter.apple.com with your example & symptoms?

Thanks,

Jim

On Aug 28, 2006, at 3:28 PM, Chris Smith wrote:

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:
http://lists.apple.com/mailman/options/xcode-users/jingham% 40apple.com


This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >Debugger thread dump confusion (From: Chris Smith <email@hidden>)
 >Re: Debugger thread dump confusion (From: Jim Ingham <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.