使用GDB进行NASM组装时打破本地标签 [英] Break at local label using GDB for NASM assembly

查看:101
本文介绍了使用GDB进行NASM组装时打破本地标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用GDB在NASM汇编代码中的本地标签处打断.

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:
...

如何在本地.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.

这篇关于使用GDB进行NASM组装时打破本地标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆