angr.state_plugins.callstack¶
- class angr.state_plugins.callstack.CallStack¶
Bases:
SimStatePluginStores the address of the function you’re in and the value of SP at the VERY BOTTOM of the stack, i.e. points to the return address.
- __init__(call_site_addr=0, func_addr=0, stack_ptr=0, ret_addr=0, jumpkind='Ijk_Call', next_frame=None, invoke_return_variable=None)¶
- Parameters:
next_frame (Self | None)
- copy_without_tail(memo)¶
- property current_function_address¶
Address of the current function.
- Returns:
the address of the function
- Return type:
- property current_stack_pointer¶
Get the value of the stack pointer.
- Returns:
Value of the stack pointer
- Return type:
- property current_return_target¶
Get the return target.
- Returns:
The address of return target.
- Return type:
- static stack_suffix_to_string(stack_suffix)¶
Convert a stack suffix to a human-readable string representation. :type tuple stack_suffix: :param tuple stack_suffix: The stack suffix. :return: A string representation :rtype: str
- property top: Self¶
Returns the element at the top of the callstack without removing it.
- Returns:
A CallStack.
- push(cf)¶
Push the frame cf onto the stack. Return the new stack.
- Return type:
Self- Parameters:
cf (Self)
- pop()¶
Pop the top frame from the stack. Return the new stack.
- call(callsite_addr, addr, retn_target=None, stack_pointer=None)¶
Push a stack frame into the call stack. This method is called when calling a function in CFG recovery.
- ret(retn_target=None)¶
Pop one or many call frames from the stack. This method is called when returning from a function in CFG recovery.
- Parameters:
retn_target (int) – The target to return to.
- Returns:
None
- dbg_repr()¶
Debugging representation of this CallStack object.
- Returns:
Details of this CalLStack
- Return type:
- class angr.state_plugins.callstack.CallStackAction¶
Bases:
objectUsed in callstack backtrace, which is a history of callstacks along a path, to record individual actions occurred each time the callstack is changed.
- __init__(callstack_hash, callstack_depth, action, callframe=None, ret_site_addr=None)¶