如何查看编译后Image是否包含调试信息?
方法一,查看编译选项有Makefile可以看Makefile,如果编译选项中包含“-g”,说明编译后是包含调试信息的。如U-Boot可通过根目录下的config.mk文件,DBGFLAGS是否赋值:
DBGFLAGS= -g其中DBGFLAGS最后是赋值给CFLAGS。
方法二,命令查看
如要查看u-boot镜像是否包含调试信息,可用命令:
readelf –S u-boot | grep"debug"如果输出如下多行,说明包含调试信息: .debug_aranges PROGBITS 00000000 00191b 000020 00 0 01
.debug_info PROGBITS 00000000 00193b 00060a 00 0 01
.debug_abbrev PROGBITS 00000000 001f45 000148 00 0 01
.debug_line PROGBITS 00000000 00208d 000296 00 0 01
.debug_frame PROGBITS 00000000 002324 00011c 00 0 04
.debug_str PROGBITS 00000000 002440 0002c0 01MS0 01
.debug_loc PROGBITS 00000000 002700 000134 00 0 01其中,可调试镜像必须包含有.debug_info和.debug_line。
页:
[1]