• 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 frustration
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GDB frustration


  • Subject: GDB frustration
  • From: "David Litwin" <email@hidden>
  • Date: Thu, 19 Jan 2006 15:28:06 -0800

I’m trying to debug a problem in my app, and am getting the run around from GDB.

 

When debugging C++ code the XCode stepping functions rarely seem to let me trace the full code path and, as many have pointed out before, seems to skip over quite a bit (often multiple lines).  Because my bug seems to happen deep between where “Step Into” button skips, I’ve come to rely on the debugger console and ‘stepi’ in GDB.

 

But lately even that has been failing me. For much of the code, Xcode can’t seem to track where it is at all, and I’ve come to rely on watching $pc in the Expressions window and looking at the disassembly pane to keep up.  There is no red arrow following along to help me, although I can’t see why not given I can look at $pc and that address is often showing in the disassembly pane.

 

Now even that is failing me.  I’ve stepped into a cast operator and can’t get Xcode to show me any disassembly.  The GDB console puts up the message:

Unable to disassemble Foo::operator Bar.

When I type “disassem $pc” I get:

No function contains specified address

 

It would be wonderful if the debugger could help me walk through my code, but failing that could it at least show me what instruction I am about to perform by typing “stepi”?  I would think the disassem command would disassemble the memory passed to it, but it seems to just look within the loaded code for it…

 

Dave

 

P.S.  Some details:  This is code running in a .dylib I’ve loaded with dlopen().  All my executables have no optimizations and full symbols.

 _______________________________________________
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 frustration
      • From: Jim Ingham <email@hidden>
    • Re: GDB frustration
      • From: Eric Albert <email@hidden>
  • Prev by Date: C Preprocessor Macro expansion in GDB
  • Next by Date: RE: Help debugging a framework
  • Previous by thread: Future DWARF support [was: Re: C Preprocessor Macro expansion in GDB]
  • Next by thread: Re: GDB frustration
  • Index(es):
    • Date
    • Thread