0

我正在尝试构建带有调试功能的 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.

先感谢您。

4

1 回答 1

0

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

于 2011-07-20T14:03:40.993 回答