Can i use my gdb to debug an Xcode project

I have an XCode that builds and runs under XCode. I would like to know if it is possible to debug it using gdb, which I am building on Mac OSX (pointed to by gdb 7). If so, can you tell me how I can do this?

Thank.

+2


source to share


3 answers


gdb-7.0 reverse debugging can currently only work with two classes of targets: 1) a remote simulator / emulator / virtual machine that supports backtracking, or 2) a built-in "process recording" target that is currently only ported to x86-linux , x86-64 linux and moxie linux.

Okay, now ... I'm taking it back. I recently discovered that process recording can work with any x86 remote target, so if you connect to your macintosh target via a "target remote" you can just do it!



There is an online tutorial for recording a process here: http://www.sourceware.org/gdb/wiki/ProcessRecord/Tutorial Read more about recording a process here: http://www.sourceware.org/gdb/wiki/ProcessRecord And vice versa debug gdb here: http://www.sourceware.org/gdb/wiki/ReverseDebug

+1


source


So you want to use your own version of gdb to debug your executable? Easy!

Open a terminal and do something like this:



$ cd <directory where Xcode project lives>
$ cd build/Debug                 (for example - depends on project configuration)
$ /usr/local/bin/my-gdb ./MyExecutable

      

Of course, by specifying the actual path to your custom gdb version.

+1


source


The Xcode debugger matters gdb

(probably with Apple specific changes). When you are debugging an application, you can access the gdb command line by opening the console from the Run menu.

What are the requirements for your application that will require you to debug with your own version gdb

?

0


source







All Articles