如何在 IDA 反汇编中跳转到函数的开始/结束?

逆向工程 艾达
2021-06-19 17:01:07

我在谷歌上找不到一个简单的问题:如果我在一个函数的中间,如何在 IDA 的反汇编中跳转到这个函数的开始/结束(序言/结尾)?

谢谢。

1个回答

我不相信默认情况下有一个热键可以做到这一点。您可能拥有的一种解决方案是将这样的内容添加到您的.idapythonrc

# define functions to do the jumping
def jump_func_start():
    Jump(GetFunctionAttr(here(), FUNCATTR_START))

def jump_func_end():
    Jump(PrevHead(GetFunctionAttr(here(), FUNCATTR_END)))

# Compile IDC wrappers to call the python
idaapi.CompileLine('static j_f_start() { RunPythonStatement("jump_func_start()"); }')
idaapi.CompileLine('static j_f_end() { RunPythonStatement("jump_func_end()"); }')

# Add the hotkey
AddHotkey("Ctrl-Alt-K", 'j_f_start')
AddHotkey("Ctrl-Alt-J", 'j_f_end')

之后,您可以输入您设置的任何热键,它应该转到函数的开始/结束