HelloSilicon icon indicating copy to clipboard operation
HelloSilicon copied to clipboard

GAS generates local symbols for labels starting with the letter L

Open danielnitzan opened this issue 2 years ago • 0 comments

To be clear, I haven't used the setup in HelloSilicon, I'm just using Xcode out of the box. Still, this might be relevant here as well. One caveat I've come across is that GAS generates local symbols for labels starting with the letter l. Thus, labels such as 'loop' are completely ignored by the debugger and breakpoint and single stepping behavior becomes weird. For example, setting a breakpoint anywhere in the loop will pause execution only at the next label in program order (say, cont in upper.s). Also, single stepping and hitting a branch back to loop (e.g. B.NE loop) doesn't get back there, but again hits the next label. Just mentioning this, since many examples in the book have loops.

danielnitzan avatar Jul 01 '22 09:07 danielnitzan