get_callers
Retrieve all callers of a specified function address in IDA Pro for reverse engineering analysis. Input the function address to identify calling relationships efficiently.
Instructions
Get all callers of the given address
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| function_address | Yes | Address of the function to get callers |
Implementation Reference
- src/ida_pro_mcp/ida_mcp/utils.py:945-965 (handler)The get_callers function implements the core logic to retrieve functions that call a given address using IDA Pro's CodeRefsTo API, filtering for actual call instructions and deduplicating by function.def get_callers(addr: str) -> list[Function]: """Get callers for a single function address""" try: callers = {} for caller_addr in idautils.CodeRefsTo(parse_address(addr), 0): func = get_function(caller_addr, raise_error=False) if not func: continue insn = idaapi.insn_t() idaapi.decode_insn(insn, caller_addr) if insn.itype not in [ idaapi.NN_call, idaapi.NN_callfi, idaapi.NN_callni, ]: continue callers[func["addr"]] = func return list(callers.values()) except Exception: return []
- Import of the get_callers helper function from utils.py.get_callers,
- Usage of get_callers within the analyze_funcs tool.callers=get_callers(addr),