GDB complains No Source Available

后端 未结 2 1631
猫巷女王i
猫巷女王i 2021-02-14 17:14

I\'m running on Ubuntu 12.10 64bit.

I am trying to debug a simple assembly program in GDB. However GDB\'s gui mode (-tui) seems unable to find the source code of my asse

2条回答
  •  逝去的感伤
    2021-02-14 17:54

    This statement is false.

    The assembler does produce line number information (note the -g -F dwarf) bits.

    On the other hand he assembles what is obviously 32-bit code as 64 bits, which may or may not work.

    Now if there are bugs in NASM's debugging output we need to know that.

    A couple of quick experiments shows that addr2line (but not gdb!) does decode NASM-generated line number information correctly using stabs but not using dwarf, so there is probably something wrong in the way NASM generates DWARF... but also something odd with gdb.

    GNU addr2line version 2.22.52.0.1-10.fc17 20120131, GNU gdb (GDB) Fedora (7.4.50.20120120-52.fc17)).

提交回复
热议问题