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

Method call_sites

python/function.py:3045–3070  ·  view source on GitHub ↗

``call_sites`` returns a list of possible call sites contained in this function. This includes ordinary calls, tail calls, and indirect jumps. Not all of the returned call sites are necessarily true call sites; some may simply be unresolved indirect jumps, for example. :return: List of Ref

(self)

Source from the content-addressed store, hash-verified

3043
3044 @property
3045 def call_sites(self) -> List['binaryview.ReferenceSource']:
3046 """
3047 ``call_sites`` returns a list of possible call sites contained in this function.
3048 This includes ordinary calls, tail calls, and indirect jumps. Not all of the returned call sites
3049 are necessarily true call sites; some may simply be unresolved indirect jumps, for example.
3050
3051 :return: List of References that represent the sources of possible calls in this function
3052 :rtype: list(ReferenceSource)
3053 """
3054 count = ctypes.c_ulonglong(0)
3055 refs = core.BNGetFunctionCallSites(self.handle, count)
3056 assert refs is not None, "core.BNGetFunctionCallSites returned None"
3057 result = []
3058 for i in range(0, count.value):
3059 if refs[i].func:
3060 func = Function(self.view, core.BNNewFunctionReference(refs[i].func))
3061 else:
3062 func = None
3063 if refs[i].arch:
3064 arch = architecture.CoreArchitecture._from_cache(refs[i].arch)
3065 else:
3066 arch = None
3067 addr = refs[i].addr
3068 result.append(binaryview.ReferenceSource(func, arch, addr))
3069 core.BNFreeCodeReferences(refs, count.value)
3070 return result
3071
3072 @property
3073 def callees(self) -> List['Function']:

Callers 1

call_site_constraintsMethod · 0.45

Calls 3

FunctionClass · 0.70
_from_cacheMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected