• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Debugger thread dump confusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugger thread dump confusion


  • Subject: Re: Debugger thread dump confusion
  • From: Jim Ingham <email@hidden>
  • Date: Mon, 28 Aug 2006 15:55:15 -0700

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:
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: This email sent to email@hidden
  • Follow-Ups:
    • Re: Debugger thread dump confusion
      • From: Chris Smith <email@hidden>
References: 
 >Debugger thread dump confusion (From: Chris Smith <email@hidden>)

  • Prev by Date: Re: Template trouble
  • Next by Date: Re: Debugger thread dump confusion
  • Previous by thread: Debugger thread dump confusion
  • Next by thread: Re: Debugger thread dump confusion
  • Index(es):
    • Date
    • Thread