diff options
| author | Josh Ferrell <josh@vector35.com> | 2024-10-23 12:39:33 -0400 |
|---|---|---|
| committer | Josh Ferrell <josh@vector35.com> | 2024-10-23 17:37:33 -0400 |
| commit | bd3d79d51267975a9ff2167bb6731222e9618c27 (patch) | |
| tree | 59c1b71e9958048ac2c77aaddfddc0f8a9b2bb93 /python | |
| parent | 62e450721a5487402522a458e88a93d82e6d3d6f (diff) | |
Add API to bulk add segments, use it in elf view
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 60cc4f28..3d5187d6 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -9055,8 +9055,22 @@ to a the type "tagRECT" found in the typelibrary "winX64common" return value.value def add_auto_segment(self, start: int, length: int, data_offset: int, data_length: int, flags: SegmentFlag) -> None: + """ + ``add_auto_segment`` Adds an analysis segment that specifies how data from the raw file is mapped into a virtual address space + + Note that the segments added may have different size attributes than requested + """ core.BNAddAutoSegment(self.handle, start, length, data_offset, data_length, flags) + def add_auto_segments(self, segments: List[core.BNSegmentInfo]) -> None: + """ + ``add_auto_segments`` Adds analysis segments that specify how data from the raw file is mapped into a virtual address space + + Note that the segments added may have different size attributes than requested + """ + segment_arr = (core.BNSegmentInfo * len(segments))(*segments) + core.BNAddAutoSegments(self.handle, segment_arr, len(segments)) + def remove_auto_segment(self, start: int, length: int) -> None: """ ``remove_auto_segment`` removes an automatically generated segment from the current segment mapping. |
