2

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).

Community
  • 1
  • 1
EMiller
  • 2,792
  • 4
  • 34
  • 55

1 Answers1

1

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.

Jason Molenda
  • 14,835
  • 1
  • 59
  • 61
  • Thanks for the answer. But does LLDB support Fortran? A quick glance on their webpage (http://lldb.llvm.org/index.html) suggests that's not the case. – EMiller Oct 01 '12 at 20:28
  • Unfortunately, no, not yet. I don't think anyone currently working on lldb works with Fortran so it's unlikely to be added soon unless someone properly motivated steps up. – Jason Molenda Oct 01 '12 at 20:59
  • Oh well. Thanks for the informative answer about the "mi" protocol. – EMiller Oct 02 '12 at 00:19