MacOS – What version of GDB version is included in your Xcode

macossnow leopardxcode

Not sure if this is suitable for Stack Overflow or here.

I'm having some problems with GDB in Xcode and I wonder if it isn't a problem with what version I'm on. I have Snow Leopard and Xcode 3.2.6. The GDB version that I believe is being used by Xcode is:

GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)

My version in Fink, for example, is:

GNU gdb (GDB) 7.4.1

I believe I can't go any higher than Xcode 3.2.6 without at least upgrading to Lion.

Can anyone tell me what version of GDB they have with their corresponding Xcode? I want to know if its worth it for me to switch to Lion or Mountain Lion just for this.

Best Answer

The version on my system (Mountain Lion, XCode 4.5 is:

GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug  5 03:00:42 UTC 2012)

Basically, 6.3 is the last version covered by the GPLv2 license, everything past that is subject to GPLv3. Apple does not distribute any GPLv3 software, presumably as it would seriously hinder their patent lawsuits. (this is also why OSX or XCode no longer ship with Samba or GCC newer than 4.2)

By the way, the last version of XCode for Snow Leopard is 4.2, but as far as I know this is only available in the downloads section to iOS or Mac developer program subscribers.