Author Topic: Debugging with local labels symbols  (Read 18255 times)

Offline Marco

  • Jr. Member
  • *
  • Posts: 2
Debugging with local labels symbols
« 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?)




Online debs3759

  • Global Moderator
  • Full Member
  • *****
  • Posts: 224
  • Country: gb
    • GPUZoo
Re: Debugging with local labels symbols
« Reply #1 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.
My graphics card database: www.gpuzoo.com

Offline Marco

  • Jr. Member
  • *
  • Posts: 2
Re: Debugging with local labels symbols
« Reply #2 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.