I run into trouble using GDB 7 (7.3) on MacOS Lion.
What I did was:
$ sudo port install gdb
After that GDB was installed to: /opt/local/bin/ggdb
But when I try to execute GDB I always receive the following at start:
BFD: unable to read unknown load command 0x24
BFD: unable to read unknown load command 0x26
BFD: unable to read unknown load command 0x24
BFD: unable to read unknown load command 0x26
Further it tells me:
Reading symbols from ... done.
but when I try to get for example a backtrace via 'bt' I only see unresolved function adresses. I tried to set the LIBRARY_PATH inside my application folder.
$ export DYLD_LIBRARY_PATH=`pwd`
but without success. The problems remain.
Using the default GDB 6.3 which is provided with Lion/Xcode works fine.
Thanks in advance for any advice.
Try cgdb for now, it's actually pretty nice so far:
sudo port install cgdb
I don't claim to understand why the latest gdb sources have an issue on the mac, but I have the same issue as you and I tried cgdb and it works for me. Links for more information:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With