• 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 can't deal with source?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugger can't deal with source?


  • Subject: Re: Debugger can't deal with source?
  • From: Jim Ingham <email@hidden>
  • Date: Fri, 3 Feb 2006 10:13:04 -0800

When your program crashes in the debugger, open the "Console Log" (from the Debug menu) and type:

(gdb) bt

that will give you the backtrace as gdb sees it. Does that have line numbers for the frames in the backtrace that are in your code? If not, then there is no debug information in those modules. You can look at the "Debug->Tools->Shared Libraries" panel to find out exactly what got loaded into your program. If you click on each entry you can see the path in the window. Is that the build version you expected?

Then, to figure out whether you actually did get debug info into the binary, do:

nm -ap "Path To Binary" > grep "SO "

if you see a bunch of paths to your source file come out, you have debug info. If not, you don't. If the latter, touch one of your files, and look at the detailed build log. In the compile line, do you see "-g" or "-gfull" or "-gused". If no, then you aren't generating debug info. If you do see this, then look to make sure that the final executable isn't getting stripped.

Hope this helps,

Jim

On Feb 2, 2006, at 4:53 PM, Scott Squires wrote:

C++ project. Compile and run debugger.
GDB can't find the source file. Project crashes providing stack trace with
c++ names. Unfortunately every breakpoint has been ignored.
Sifted through the archives. Generate Debug Symbols is on, lazy symbols is
off, etc.


Tried the
defaults write com.apple.Xcode PBXGDBDebuggerLogFileName /tmp/XCGDBLog
defaults write com.apple.Xcode PBXGDBDebuggerLogToFile YES
Process. Now have a log that says source file aren't found.

Compiles and links fine.

Anyone have any insights how to get the debugger to actually show and use
the source breakpoints?



_______________________________________________ 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

Jim Ingham Apple Developer Tools



_______________________________________________
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 can't deal with source?
      • From: Scott Squires <email@hidden>
References: 
 >Debugger can't deal with source? (From: Scott Squires <email@hidden>)

  • Prev by Date: RE: Framework problem when linking in Release mode
  • Next by Date: Create Simple Java Target/Executable
  • Previous by thread: Re: Debugger can't deal with source? Solved.
  • Next by thread: Re: Debugger can't deal with source?
  • Index(es):
    • Date
    • Thread