【问题标题】:Building binutils with debugging mode使用调试模式构建 binutils
【发布时间】:2011-06-28 13:12:37
【问题描述】:

我正在尝试构建带有调试功能的 binutils 2.21 源代码。我的主要目的是实际调试 objdump。但为了构建它,我认为我必须构建整个包。

很遗憾,配置文件中没有调试选项。在配置之前,我尝试将 -g 和 -ggdb 添加到 CFLAGS 中。但是错误是:

Configuring in ./intl
configure: loading cache ./config.cache
configure: error: `CFLAGS' has changed since the previous run:
configure:   former value:  `-g -O2 -D__USE_MINGW_ACCESS'
configure:   current value: `-g -D__USE_MINGW_ACCESS'
configure: error: in `/c/binutils-2.21/intl':
configure: error: changes in the environment can compromise the build
configure: error: run `make distclean' and/or `rm ./config.cache' and start over

make[1]: *** [configure-intl] Error 1
make[1]: Leaving directory `/c/binutils-2.21'
make: *** [all] Error 2

我尝试了“make clean”和“make distclean”,但我收到了同样的错误。实际上,根据以前的 CFLAGS,它之前有 -g 选项,但是当我尝试在 gdb 中打开 objdump.exe 时,它​​说

    Reading symbols from c:\binutils-2.21\binutils/objdump.exe...
(no debugging symbols found)...done.

提前谢谢你。

【问题讨论】:

    标签: c mingw gnu binutils


    【解决方案1】:

    是的,我已经尝试了很多。正如我所说,-g 标签在 gcc 上。但是 makefile 将所有启用调试的二进制文件保存到 binutils.libs\ 目录。因此,当我在 gdb 下运行 binutils.libs\objdump.exe 时,一切正常。不过还是谢谢你的回答。

    【讨论】:

      猜你喜欢
      • 2014-06-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-21
      • 2011-10-23
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多