Simple question that I coudn't find googling: if I'm in the middle of a function how can I jump to the start/end (prologue/epilogue) of this function in IDA's disassembly?



I don't believe there is a hotkey that will do it by default. One solution you could have is to add something like this to your .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')

After that you can just type whatever hotkey you set and it should go to the start / end of the function

  • Hum that's odd. IDA is such a powerful tool but it kinda seems to have a lot of missing nice simple features. Other example of such is the sintax highlight, it doesn't even have the possibility of change the color of specific instructions. Sometimes I find myself wanting to generate a .dbg of the IDB and go to the olly/x64dbg to do static analysis due to the lack of these features. Thanks anyway :) Dec 24 '17 at 10:08
  • Not sure about changing the syntax colors from the default. I know some people use themes in IDA. If you just want to color the instruction, there's a ColorInstruction command (Edit | Other | Color instruction) you can set a hotkey for it by searching for ColorInstruction in the shortcuts menu (Options | Shortcuts). I commonly use that when reversing along with GraphColor / GraphDefaultColor to markup IDBs with paths taken
    – Bambu
    Dec 25 '17 at 13:11
  • 1
    Ctrl-P, Enter works for start.
    – Igor Skochinsky
    Dec 25 '17 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.