سؤال

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)

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`
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top