我正在尝试构建带有调试功能的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.提前谢谢你。
发布于 2011-07-20 22:03:41
是的我试过很多次了。就像我说的,-g tag盯上了gcc。不过,makefile会将所有启用调试的二进制文件保存到binutils.libs\目录中。因此,当我在gdb下运行binutils.libs\objdump.exe时,一切都很好。不过,还是要感谢你的回答。
https://stackoverflow.com/questions/6507000
复制相似问题