MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / get_stack_vars_referenced_by

Method get_stack_vars_referenced_by

python/function.py:2062–2082  ·  view source on GitHub ↗
(
	    self, addr: int, arch: Optional['architecture.Architecture'] = None
	)

Source from the content-addressed store, hash-verified

2060 return result
2061
2062 def get_stack_vars_referenced_by(
2063 self, addr: int, arch: Optional['architecture.Architecture'] = None
2064 ) -> List['variable.StackVariableReference']:
2065 if arch is None:
2066 arch = self.arch
2067 count = ctypes.c_ulonglong()
2068 refs = core.BNGetStackVariablesReferencedByInstruction(self.handle, arch.handle, addr, count)
2069 assert refs is not None, "core.BNGetStackVariablesReferencedByInstruction returned None"
2070 result = []
2071 for i in range(0, count.value):
2072 var_type = types.Type.create(
2073 core.BNNewTypeReference(refs[i].type), platform=self.platform, confidence=refs[i].typeConfidence
2074 )
2075 var = variable.Variable.from_identifier(self, refs[i].varIdentifier)
2076 result.append(
2077 variable.StackVariableReference(
2078 refs[i].sourceOperand, var_type, refs[i].name, var, refs[i].referencedOffset, refs[i].size
2079 )
2080 )
2081 core.BNFreeStackVariableReferenceList(refs, count.value)
2082 return result
2083
2084 def get_stack_vars_referenced_by_address_if_available(
2085 self, addr: int, arch: Optional['architecture.Architecture'] = None

Callers

nothing calls this directly

Calls 3

createMethod · 0.45
from_identifierMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected