Question

Similar questions are:

How to specify which GDB I can use in XCode on MacOS

and

Can i switch gdb client on XCode?

The former refers to a document which is out of date and appears to not work for XCode 3.2.6 and the latter question was never really answered.

So does anyone know how I can use a different version of GDB, namely the one obtained with fink, fsf-gdb (GDB 7.4.1).

Was it helpful?

Solution

No, it will not work. gdb and Xcode use the "mi" text-based protocol for communication and Apple has extended the mi interface in a number of ways over the years for Xcode's benefit. Most of these changes never made it back upstream to mainline FSF gdb -- or those that did, were implemented in a different way. Getting Xcode to run a different gdb is not the tricky bit - the tricky bit is that they won't work together.

I haven't tested a modern gdb and Xcode but I really don't think it will work.

If you haven't tried the lldb debugger recently, give it a shot. The version in Xcode 4.5 is pretty solid. Apple is actively supporting and developing this debugger now, if you're working on Mac OS X you'll be happier if you can adopt lldb for your workflow. There is a gdb/lldb command cheatsheet at http://lldb.llvm.org/lldb-gdb.html which will show the equivalent lldb command for various gdb commands.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top