angr.callable¶
- class angr.callable.Callable¶
Bases:
objectCallable is a representation of a function in the binary that can be interacted with like a native python function.
If you set perform_merge=True (the default), the result will be returned to you, and you can get the result state with callable.result_state.
Otherwise, you can get the resulting simulation manager at callable.result_path_group.
- __init__(project, addr, prototype=None, concrete_only=False, perform_merge=True, base_state=None, toc=None, cc=None, add_options=None, remove_options=None, step_limit=None, techniques=None)¶
- Parameters:
project (
Project) – The project to operate onaddr (
int) – The address of the function to useprototype (
SimTypeFunction|None) – The signature of the calls you would like to make. This really shouldn’t be optional.concrete_only – Throw an exception if the execution splits into multiple paths
perform_merge – Merge all result states into one at the end (only relevant if concrete_only=False)
base_state (
SimState|None) – The state from which to do these runstoc – The address of the table of contents for ppc64
cc (
SimCC|None) – The SimCC to use for a calling conventionstep_limit (int | None)
techniques (list[ExplorationTechnique] | None)
- set_base_state(state)¶
Swap out the state you’d like to use to perform the call.
- Parameters:
state – The state to use to perform the call
- perform_call(*args, prototype=None)¶