gdb + nasm debug info not being created

后端 未结 3 1569
清酒与你
清酒与你 2021-02-15 02:16

I am trying to debug a small .asm file that I wrote in Ubuntu. I am however running into an issue where my symbol table is not being loaded and was looking for some help.

相关标签:
3条回答
  • 2021-02-15 03:00

    cpowel2 solved his own problem:

    SOLVED: Just in case anyone else was having the same issue (it seems like there are a ton of posts on the net) I was able to resolve the issue by changing the section .txt portion of my file to section .text and gdb recognized it right away.

    0 讨论(0)
  • 2021-02-15 03:00

    SECTION .text

    ; in nasm - a text section has to be in lower case for gdb to pick it up.

    0 讨论(0)
  • 2021-02-15 03:04

    Assemble your file with the following commands :-

    nasm -f elf -F dwarf -g file.asm
    ld -m elf_i386 -o file file.o

    and then use gdb,

    0 讨论(0)
提交回复
热议问题