• 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: variable viewing in gdb window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: variable viewing in gdb window


  • Subject: Re: variable viewing in gdb window
  • From: Daniel Luis dos Santos <email@hidden>
  • Date: Tue, 3 Mar 2009 15:54:44 +0000

In fact I forgot to mention that I am targeting 64 bit, but with no GC.
I just wanted to get a feeling for how reliable is debugging in Xcode. Of course I can always put log statements in the code but that I want to avoid. At least if there were some log framework for cocoa like log4j. Is there any ?


thanks

On Mar 2, 2009, at 6:13 PM, Andy Lee wrote:

On Mar 2, 2009, at 1:00 PM, Quincey Morris wrote:
On Mar 2, 2009, at 08:45, Andy Lee wrote:

First let's clear something up: "print [data bytes]" won't work, so I don't see any point in repeatedly trying it. What's weird is that I get a different error than you do:

---------------
(gdb) print data
$1 = (NSData *) 0x138460
Current language: auto; currently objective-c
(gdb) print [data bytes]
Unable to call function "objc_msgSend" at 0x9169c670: no return type information available.



The error message you're seeing doesn't suggest any problem with 'data' -- it's just gdb insisting you cast the result.

Good point. There's a difference between the questions "How do I enter a command that gdb accepts?", "Do I have a bug?", and "Does gdb/GC/something else have a bug?"


--Andy


The difference in Daniel's case is that his 'data' pointer is (apparently) a 64-bit value, implying this is a 64-bit app. So the error message he's seeing could be:


a. 64-bit gdb's version of the same error message you got (in which case 'print (void*) [data bytes]' ought to work).

b. 64-bit gdb not working right (and I've seen a fair number of complaints about that on this list).

I think your suggestion of logging the value instead is a good one. Unless someone can jump in and spot something obvious, this does begin to look like a candidate for a bug report.


_______________________________________________
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: variable viewing in gdb window
      • From: Jim Ingham <email@hidden>
References: 
 >Re: variable viewing in gdb window (From: Daniel Luis dos Santos <email@hidden>)
 >Re: variable viewing in gdb window (From: Andy Lee <email@hidden>)
 >Re: variable viewing in gdb window (From: Quincey Morris <email@hidden>)
 >Re: variable viewing in gdb window (From: Andy Lee <email@hidden>)

  • Prev by Date: Xcode's 'Find in Project' fails to find all instance of the search term
  • Next by Date: unable to debug the proj in root account
  • Previous by thread: Re: variable viewing in gdb window
  • Next by thread: Re: variable viewing in gdb window
  • Index(es):
    • Date
    • Thread