简体   繁体   中英

Break at local label using GDB for NASM assembly

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 ?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM