我用apache2选项在不同的服务器上编译了我的gcc,
-pg -DGPROF -g -DNO_USE_SIGACTION我将这个apache2二进制文件复制到不同的服务器上,并执行了一次,得到了gmon.out。
但是当使用命令创建分析文件时,
gprof /usr/sbin/apache2 /gmon.out > /tmp/apa.txt我得到了一连串的错误,
BFD: Dwarf Error: found dwarf version '4', this reader only handles version 2 and 3 information.
BFD: Dwarf Error: found dwarf version '0', this reader only handles version 2 and 3 information.
BFD: Dwarf Error: found dwarf version '715', this reader only handles version 2 and 3 information.
BFD: Dwarf Error: found dwarf version '59393', this reader only handles version 2 and 3 information.大约100行类似的错误。如何摆脱这些来生成gprof分析文件?
编译操作系统:
cat /etc/debian_version
6.0.7
gcc version 4.8.1 (crosstool-NG 1.19.0)执行操作系统:
cat /etc/debian_version
6.0.8发布于 2014-01-08 04:00:27
你有一个新版本的GCC,但听起来你有一个更老的版本的gprof。
一个解决办法是构建并安装您自己的gprof。这不太难。
另一个解决办法是用“-g侏儒- 3”进行重建,这将告诉GCC使用侏儒3号。
https://stackoverflow.com/questions/20943723
复制相似问题