LLDB可以在*(& function + offset)处中断吗? [英] Can LLDB break on *(&function+offset)?

查看:93
本文介绍了LLDB可以在*(& function + offset)处中断吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我习惯于使用GDB,还有一个等效功能我无法在LLDB中找到.我希望能够在距函数基地址一定偏移量处放置一个断点.使用GDB,我可以做到:

I'm used to using GDB and there is an equivalent function I am not able to find with LLDB. I would like to be able to place a breakpoint at a certain offset from the base address of a function. With GDB I can do:

b *(& functionX + 20)

b *(&functionX+20)

是否可以使用LLDB做到这一点?

Is there a way to do that with LLDB?

推荐答案

虽然我使用的格式有些奇怪,但我使用的方法是:

While its a bit odd in its formatting I method I use is:

b -a `(void())functionX`+20

作为一个旁注,当我想快速获取一个函数的地址时,我只是在没有命令的情况下运行了该地址.它将给出一个错误,但它会迅速显示该地址:

As a side note when I you want to quickly get the address of a function I just run the same without a command.. it will give an error but it quickly show the address:

`(void())functionX`

这篇关于LLDB可以在*(& function + offset)处中断吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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