elf - How to load text (not binary) debugging informaton from a seperate file with GDB? -
i have elf executable looks this:
$ hexcat hello 00000000: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 .elf............ 00000010: 02 00 03 00 01 00 00 00 d7 80 04 08 34 00 00 00 ............4... 00000020: 00 00 00 00 00 00 00 00 34 00 20 00 01 00 00 00 ........4. ..... 00000030: 00 00 00 00 01 00 00 00 00 00 00 00 00 80 04 08 ................ 00000040: 00 80 04 08 e2 80 04 08 e2 80 04 08 05 00 00 00 ................ 00000050: 00 10 00 00 b8 04 00 00 00 8b 5c 24 04 8b 4c 24 ..........\$..l$ 00000060: 0c 8b 54 24 08 cd 80 c3 55 8b ec 6a 01 ff 75 0c ..t$....u..j..u. 00000070: ff 75 08 ff 75 fc ba 04 00 00 00 33 c0 e8 d2 ff .u..u......3.... 00000080: ff ff 8d 65 fc 50 e8 01 00 00 00 0a 6a 01 6a 01 ...e.p......j.j. 00000090: ba 04 00 00 00 33 c0 e8 b8 ff ff ff 8d 65 fc 50 .....3.......e.p 000000a0: c9 c3 55 8b ec e8 0d 00 00 00 48 65 6c 6c 6f 2c ..u.......hello, 000000b0: 20 57 6f 72 6c 64 21 6a 0d 33 d2 33 c0 e8 a6 ff world!j.3.3.... 000000c0: ff ff 8d 65 00 6a 00 8b 45 fc c9 c3 8b 5c 24 04 ...e.j..e....\$. 000000d0: b8 01 00 00 00 cd 80 e8 c6 ff ff ff 50 e8 ea ff ............p... 000000e0: ff ff ..
i have file of symbol table information looks this:
$ cat hello.debug rec 8048054 8048068 code write rec 804808b 804808c string _tmp_2 rec 8048068 80480a2 code printl rec 80480aa 80480b7 string _tmp_4 rec 80480a2 80480cc code main rec 80480cc 80480d7 code exit rec 80480d7 80480e2 code _start
i use latter when debugging former; how feed information gdb?
(the actual program trying debug larger; example.)
how feed information gdb?
i don't believe can.
your best bet feed information tool create new elf file symbol table described hello.debug
(this should easy generating assembly file appropriate .set
directives (documentation) , compiling/linking result), , feed that new elf file gdb add-symbol-file
.
Comments
Post a Comment