i'm very new in assembly (nasm x86_64), and i run into a problem while i tried to use gdb, which says "no debugging symbols found" after assembling with -g -F dwarf options.
I know that the problem can be caused by using .txt instead of .text, but i have corrected it and it didn't really help. I tried to google it, but i haven't found a solution. My .asm and makefile are on the
screenshot.
P.S. sorry my poor english.
CodePudding user response:
Your linking command
ld ‑m elf_x86_64 ‑s $(source).o ‑o $(source)
will remove the generated DWARF debugging information.
‑s is short for ‑‑strip‑all.
Remove this flag for a debuggable executable.
If you wanted to keep just the debugging information, call strip(1) with ‑‑only‑keep‑debug after the linking step.
