NASM Forum > Using NASM

GDB/DDD fails to step debugging even with debug info


Rodrigo Robles:
After upgrading my Debian Box, my nasm upgraded to version 2.15.05 and gdb to 10.1.90.

So ddd start failing to step debugging, it says "single stepping until exit from function <NAME>, which has no line number information". But DDD is showing the source with the line numbers. Fails both for stabs and dwarf formats.

I have another box with Ubuntu Focal, NASM 2.14.02 and gdb 9.2 where gdb/ddd works well, but only with dwarf format.

Any ideias how to solve this?

Frank Kotler:
Welcome to the Forum.

I don't know.

As you seem to know, Nasm defaults to "stabs" but "dwarf" is preferred. So "-F dwarf".
Do NOT give ld "-s". Seems obvious but some people  do it.
Give gcc "-g" if you're using it.
Start your code with a single-byte opcode,,, "nop" is good.

Other than that... Good Luck!



[0] Message Index

Go to full version