objdump常用用法
验证二进制文件中是否有debug信息,也即编译的时候,是否使用了“-g”选项
objdump --debugging <binary-file>
<binary-file>可以是 .o, .a, .so 可执行文件等均可
带了“-g”选项的,会有如下字样
Contents of the .debug_aranges section:
...
Contents of the .debug_info section:
...
Contents of the .debug_str section:
...
Contents of the .debug_abbrev section:
...
[admin@host-11-20-51-205 bin]$ objdump --debugging ./common/_objs/common/json_parse.pic.o | grep Contents Contents of the .debug_info section: Contents of the .debug_abbrev section: Contents of the .debug_aranges section: Contents of the .debug_ranges section: Contents of the .debug_str section: Contents of the .eh_frame section: