问题
I want to break at a local label in NASM assembly code using GDB.
Issuing the following command yields the output:
(gdb) break *start.label1 + 217
Attempt to extract a component of a value that is not a structure.
Here my code goes something like this:
global _start
_start:
...
.label1:
...
How can I break at local .label1
?
回答1:
Disassemble the function where your local label is called, select the address and add a break as you normally would with the address, not the label name. You can also disassemble by the address for local labels.
来源:https://stackoverflow.com/questions/38944547/break-at-local-label-using-gdb-for-nasm-assembly