1

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.

2
  • 1
    Your source and build script should be quoted as text, not shown in a screenshot. Commented Feb 11, 2022 at 8:15
  • 1
    @ecm thanks, i don't think there is a point in editing this question since it is answered already, but i'll take care of it next time. Commented Feb 11, 2022 at 8:37

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.