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