Last active
March 28, 2016 17:25
-
-
Save vdudouyt/8381030 to your computer and use it in GitHub Desktop.
A caller trace plugin for IDA Pro
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from idaapi import * | |
| def print_caller(): | |
| return_addr = Dword(cpu.Esp) | |
| call_addr = return_addr - 5 | |
| current_function = GetFunctionName(cpu.Eip) | |
| caller_function = GetFunctionName(call_addr) | |
| print "%s(0x%08X): %s" % (caller_function, call_addr, current_function) | |
| def print_caller_and_continue(): | |
| print_caller() | |
| continue_process() | |
| idaapi.CompileLine('static print_caller_and_continue() { RunPythonStatement("print_caller_and_continue()"); }') | |
| AddHotkey("F11", 'print_caller_and_continue') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment