Author Topic: GDB/DDD fails to step debugging even with debug info  (Read 10674 times)

Offline Rodrigo Robles

  • Jr. Member
  • *
  • Posts: 10
GDB/DDD fails to step debugging even with debug info
« on: October 12, 2021, 09:50:03 PM »
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?

Offline Frank Kotler

  • NASM Developer
  • Hero Member
  • *****
  • Posts: 2667
  • Country: us
Re: GDB/DDD fails to step debugging even with debug info
« Reply #1 on: October 12, 2021, 10:56:10 PM »
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!

Best,
Frank