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

Method relocations_at

python/binaryview.py:3636–3649  ·  view source on GitHub ↗

List of relocations for a given address

(self, addr: int)

Source from the content-addressed store, hash-verified

3634 core.BNSetMaxFunctionSizeForAnalysis(self.handle, size)
3635
3636 def relocations_at(self, addr: int) -> List[Relocation]:
3637 """List of relocations for a given address"""
3638 count = ctypes.c_ulonglong()
3639 relocs = core.BNGetRelocationsAt(self.handle, addr, count)
3640 assert relocs is not None, "core.BNGetRelocationRanges returned None"
3641 result = []
3642 try:
3643 for i in range(0, count.value):
3644 reloc_handle = core.BNNewRelocationReference(relocs[i])
3645 assert reloc_handle is not None, "core.BNNewRelocationReference is not None"
3646 result.append(Relocation(reloc_handle))
3647 return result
3648 finally:
3649 core.BNFreeRelocationList(relocs, count)
3650
3651 @property
3652 def relocation_ranges(self) -> List[Tuple[int, int]]:

Callers 1

apply_relocationMethod · 0.45

Calls 2

RelocationClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected