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

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


  • Subject: gdb: Newbie can't use 'print -[object message]'
  • From: Jerry Krinock <email@hidden>
  • Date: Sat, 23 Jan 2010 21:32:31 -0800

I know how to print the result of a -description message to an Obj-C object in gdb by using 'po'.  But I would sometimes like to print the results of other messages.  In the document "Debugging with GDB", I found this:

************************************

The Print Command With Objective-C

The print command has also been extended to accept methods. For example:

print -[object hash]

will tell GDB to send the hash message to object and print the result.

************************************

Great!  So, while debugging, just to test this, I asked gdb for the -description of the object at 0x2e18fb80 as shown below, but it gave me a bad answer....

(gdb) print -[0x2e18fb80 description]
Argument to negate operation not a number.

How am I misinterpreting the documentation?

Thanks,

Jerry

 _______________________________________________
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: Roland King <email@hidden>
  • Prev by Date: C++: what could cause dynamic_cast<> to fail?
  • Next by Date: Re: gdb: Newbie can't use 'print -[object message]'
  • Previous by thread: Re: C++: what could cause dynamic_cast<> to fail?
  • Next by thread: Re: gdb: Newbie can't use 'print -[object message]'
  • Index(es):
    • Date
    • Thread