• 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: Scott Ribe <email@hidden>
  • Date: Mon, 28 Aug 2006 17:49:04 -0600
  • Thread-topic: Debugger thread dump confusion

> 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.)

- So if user were a nil string, you'd more likely bomb inside printf, having
passed it either NULL or a random value as the char *.

- But is user really nil? Isn't it the address of the NSFullUserName
function? In which case, you're back to bombing in the obc_msgSend because
the user value does not point to a valid string...


--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice


 _______________________________________________
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: Shawn Erickson <email@hidden>
References: 
 >Debugger thread dump confusion (From: Chris Smith <email@hidden>)

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