``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)
| 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']: |
no test coverage detected