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

Method get_sections_at

python/binaryview.py:9626–9638  ·  view source on GitHub ↗
(self, addr: int)

Source from the content-addressed store, hash-verified

9624 core.BNRemoveUserSection(self.handle, name)
9625
9626 def get_sections_at(self, addr: int) -> List[Section]:
9627 count = ctypes.c_ulonglong(0)
9628 section_list = core.BNGetSectionsAt(self.handle, addr, count)
9629 assert section_list is not None, "core.BNGetSectionsAt returned None"
9630 result = []
9631 try:
9632 for i in range(0, count.value):
9633 section_handle = core.BNNewSectionReference(section_list[i])
9634 assert section_handle is not None, "core.BNNewSectionReference returned None"
9635 result.append(Section(section_handle))
9636 return result
9637 finally:
9638 core.BNFreeSectionList(section_list, count.value)
9639
9640 def get_section_by_name(self, name: str) -> Optional[Section]:
9641 section = core.BNGetSectionByName(self.handle, name)

Callers 2

_get_current_sectionsFunction · 0.80
make_codeFunction · 0.80

Calls 2

SectionClass · 0.70
appendMethod · 0.45

Tested by

no test coverage detected