The address where filename has been loaded is missing [GDB]

两盒软妹~` 提交于 2019-12-02 21:03:45

objcopy --only-keep-debug a.out a.out.sym

If you want GDB to load the a.out.sym automatically, follow the steps outlined here (note in particular that you need to do the "add .gnu_debuglink" step).

This address is representing WHAT

The address GDB wants is the location of .text section of the binary. To find it, use readelf -WS a.out. E.g.

$ readelf -WS /bin/date
There are 28 section headers, starting at offset 0xe350:

Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
  [ 0]                   NULL            0000000000000000 000000 000000 00      0   0  0
  [ 1] .interp           PROGBITS        0000000000400238 000238 00001c 00   A  0   0  1
...
  [13] .text             PROGBITS        0000000000401900 001900 0077f8 00  AX  0   0 16

Here, you want to give GDB 0x401900 as the load address.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!