• 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: Chris Smith <email@hidden>
  • Date: Tue, 29 Aug 2006 08:33:16 +0100


On 29 Aug 2006, at 02:18, Shawn Erickson wrote:


On Aug 28, 2006, at 4:49 PM, Scott Ribe wrote:

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

Well, actually no, or maybe ;-)

- In Objective-C it's legal to send messages to nil. You might or might not
get a useful return value (IIRC the rule is that if the method returns an
object you get back nil, but if the method returns a C type the return is
undefined. Even worse, there are cases where on PPC the 0'ish value will be
returned, but not on Intel.)

"In Objective-C, it is valid to send a message to a nil object. The Objective-C runtime assumes that the return value of a message sent to a nil object is nil, as long as the message returns an object or any integer scalar of size less than or equal to sizeof(void*).
On Intel-based Macintosh computers, messages to a nil object always return 0.0 for methods whose return type is float, double, long double, or long long. Methods whose return value is a struct, as defined by the Mac OS X ABI Function Call Guide to be returned in registers, will return 0.0 for every field in the data structure. Other struct data types will not be filled with zeros. This is also true under Rosetta. On PowerPC Macintosh computers, the behavior is undefined."


<http://developer.apple.com/documentation/MacOSX/Conceptual/ universal_binary/universal_binary_tips/chapter_5_section_22.html>

Interesting.

In fact as stated by Scott Ribe, I'm actually passing the address of the code which will bomb but for other reasons. The stack trace is still useless. I mean Xcode (or more specifically gdb) should know where main is, it should know that it is Obj-C code and it should know how to deal with it. I've raised an issue - will see if I get any luck.

Thanks all,

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
References: 
 >Re: Debugger thread dump confusion (From: Scott Ribe <email@hidden>)
 >Re: Debugger thread dump confusion (From: Shawn Erickson <email@hidden>)

  • Prev by Date: Re: Cmath and math.h Changes in Xcode 2.4
  • Next by Date: build phase "copy files" not working with PEF file
  • Previous by thread: Re: Debugger thread dump confusion
  • Next by thread: Re: Debugger thread dump confusion
  • Index(es):
    • Date
    • Thread