• 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: gdb: Newbie can't use 'print -[object message]'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gdb: Newbie can't use 'print -[object message]'


  • Subject: Re: gdb: Newbie can't use 'print -[object message]'
  • From: Clark Cox <email@hidden>
  • Date: Sat, 23 Jan 2010 22:14:29 -0800

On Sat, Jan 23, 2010 at 9:42 PM, Roland King <email@hidden> wrote:
> You probably aren't misinterpreting the documentation, that's what it says.
>
> However as far as I know you don't need the '-' and it doesn't work that way (it tries to evaluate it as a unary minus), you do need to tell it however what the return type of the function is because gdb never knows unless it's an object.
>
> So I think that 'print -[object hash]' in the documentation should really say 'print (unsigned int)[ object hash ]' and for what you're doing, since the function returns an object (NSString*) you want to use po again on the result
>
>        po [ 0x2e18fb80 description ]

And since, you're just printing the description:

        po 0x2e18fb80

will do what you want as well.

--
Clark S. Cox III
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: gdb: Newbie can't use 'print -[object message]'
      • From: Jerry Krinock <email@hidden>
    • Re: gdb: Newbie can't use 'print -[object message]'
      • From: Roland King <email@hidden>
References: 
 >gdb: Newbie can't use 'print -[object message]' (From: Jerry Krinock <email@hidden>)
 >Re: gdb: Newbie can't use 'print -[object message]' (From: Roland King <email@hidden>)

  • Prev by Date: Re: gdb: Newbie can't use 'print -[object message]'
  • Next by Date: Re: gdb: Newbie can't use 'print -[object message]'
  • Previous by thread: Re: gdb: Newbie can't use 'print -[object message]'
  • Next by thread: Re: gdb: Newbie can't use 'print -[object message]'
  • Index(es):
    • Date
    • Thread