IDA Pro 跳到从 base 偏移

IDA Pro jumping to offset from base

我使用 CheatEngine 作为调试器(并为此得到了很多废话)。当我找到地址时,我总是根据指令开始处的偏移量将它们记下来(例如 program.exe+402C0)。如果能够通过这种引用位置的方法使用 goto 函数,那就太好了;有办法吗?

根据 IDA Pro 的文档:

If the entered [goto] string can not be recognized as a hexadecimal or location name, IDA will try to interpreet it as an expression using the current script interpreter. The default interpreter is IDC.

所以你可以做的是在 IDC 解释器中定义一个全局变量(使用 IDA 视图底部的栏)来标识你的模块的基地址:

extern ModuleBaseAddress;
ModuleBaseAddress = 0x400000; // Example base address

然后,无论何时你想转到基地址+偏移量,你只需打开跳转window(使用g-key)并输入:

ModuleBaseAddress + 0x1000 // 0x1000 is your offset