如何使用MacPorts在MacOS Lion上设置/使用GDB 7 [英] How to setup/using GDB 7 on MacOS Lion with MacPorts

查看:139
本文介绍了如何使用MacPorts在MacOS Lion上设置/使用GDB 7的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MacOS Lion上使用GDB 7(7.3)遇到麻烦。



我所做的是:

  $ sudo port install gdb 

之后GDB安装到:/ opt / local / bin / ggdb



但是当我尝试执行GDB时,我总是在开始时收到以下内容:

  BFD:无法读取未知的加载命令0x24 
BFD:无法读取未知的加载命令0x26
BFD:无法读取未知的加载命令0x24
BFD:无法读取未知的加载命令0x26

进一步告诉我:



从...读取符号完成。



但是当我尝试通过'bt'获得一个回溯跟踪时,我只看到未解析的函数地址。我试图在我的应用程序文件夹中设置LIBRARY_PATH。

  $ export DYLD_LIBRARY_PATH =`pwd` 

但没有成功。问题依然存在。



使用Lion / Xcode提供的默认GDB 6.3工作正常。



谢谢提前为任何建议。

解决方案

现在尝试cgdb,到目前为止还不错,

  sudo port install cgdb 

我不声称明白为什么最新的gdb源在Mac上有问题,但是我有同样的问题,你和我尝试过cgdb,它适用于我。链接了解更多信息:




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:

这篇关于如何使用MacPorts在MacOS Lion上设置/使用GDB 7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆