Break at local label using GDB for NASM assembly

与世无争的帅哥 提交于 2020-01-04 06:14:45

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!