[Nasm-devel] Debug flags source regression?

behindthebrain behindthebrain at zoho.eu
Fri Nov 4 15:18:44 PDT 2022


I'm not sure whether the following is a bug in nasm or gdb:

On Fedora-36:
NASM version 2.15.05 compiled on Jan 20 2022
GNU gdb (GDB) Fedora 12.1-2.fc36
GNU ld version 2.37-36.fc36

The debug flag should produce visible source in gdb:

```sh
nasm -f elf64 -g -F dwarf whatever.asm
# or
nasm -f elf64 -gdwarf whatever.asm

ld whatever.o
```

However, the source is missing.
The filetype still says debuginfo included.

Other assemblers work just fine with this version of Fedora's gdb:
```sh
yasm -f elf64 -g dwarf2 whatever.asm
as --gstabs+ whatever.s
```
when linking in the same way.

On Debian, it works as expected.
NASM version 2.15.05
GNU gdb (Debian 10.1-1.7) 10.1.90.20210103-git
GNU ld (GNU Binutils for Debian) 2.35.2

This seems likely to be a bug, or a change,
but I could be missing something.
The fact that gdb and ld still work `yasm` and `as` suggest nasm may be
being overly sensitive about something that is different in ld or gdb
across these versions?

Thanks!



More information about the Nasm-devel mailing list