NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: Marco on April 19, 2021, 05:25:59 PM

Title: Debugging with local labels symbols
Post by: Marco on April 19, 2021, 05:25:59 PM
Hi All,

Recently I noticed that gdb doesn't like the local-label expansion that nasm does. I am referring to creating a symbol function.local-label for each local label used, as in:

Code: [Select]
foo:
   nop
   .end:
   nop

Ending up generating a foo.end symbol. This confuses gdb frame tracking, as it thinks it is a different frame.

You can see more details on the question I asked in stackoverflow[0]

Does this bother you? How do you deal with it? I think it would be nice to be able to disable that behavior if your are not using it (why would you need it after assembling your files?)



Title: Re: Debugging with local labels symbols
Post by: debs3759 on April 19, 2021, 11:49:36 PM
nasm was always written to use nested labels like that, and it will be in the object file as the assembler doesn't check whether the label is needed by the linker or not.
Title: Re: Debugging with local labels symbols
Post by: Marco on April 20, 2021, 05:08:59 PM
Thanks for your reply, debs3759,

I am not arguing with the feature. I am asking if there's a way to disable it so it becomes easier to debug with gdb, or for alternatives.