diff options
| author | Jordan Wiens <jordan@psifertex.com> | 2019-08-28 07:30:30 -0400 |
|---|---|---|
| committer | Jordan Wiens <jordan@psifertex.com> | 2019-08-28 07:30:30 -0400 |
| commit | 4bcf1d33b419aa2a49783e2b3588f46497e76831 (patch) | |
| tree | 3f6989b2335e61ca9972302808c07253a315431f /python | |
| parent | 7971d55486180e07a8bd3a0741bac7b03b6fe460 (diff) | |
initial documentation for add_user_section and add_user_segment
Diffstat (limited to 'python')
| -rw-r--r-- | python/binaryview.py | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 868342a6..594109bf 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -4706,6 +4706,16 @@ class BinaryView(object): core.BNRemoveAutoSegment(self.handle, start, length) def add_user_segment(self, start, length, data_offset, data_length, flags): + """ + ``add_user_segment`` creates a user-defined segment that specifies how data form the raw file is mapped into a virtual address space. + + :param int start: virtual address of the start of the segment + :param int length: length of the segment (may be larger than the source data) + :param int data_offset: offset from the parent view + :param int data_length: length of the data from the parent view + :param enums.SegmentFlag flags: SegmentFlags + :rtype: None + """ core.BNAddUserSegment(self.handle, start, length, data_offset, data_length, flags) def remove_user_segment(self, start, length): @@ -4733,6 +4743,22 @@ class BinaryView(object): def add_user_section(self, name, start, length, semantics = SectionSemantics.DefaultSectionSemantics, type = "", align = 1, entry_size = 1, linked_section = "", info_section = "", info_data = 0): + """ + ``add_user_section`` creates a user-defined section that can help inform analysis by clarifying what types of + data exist in what ranges. Note that all data specified must already be mapped by an existing segment. + + :param str name: name of the section + :param int start: virtual address of the start of the section + :param int length: length of the section + :param enums.SectionSemantics semantics: SectionSemantics of the section + :param str type: optional type + :param int align: optional byte alignment + :param int entry_size: optional entry size + :param str linked_section: optional name of a linked section + :param str info_section: optional name of an associated informational section + :param int info_data: optional info data + :rtype: None + """ core.BNAddUserSection(self.handle, name, start, length, semantics, type, align, entry_size, linked_section, info_section, info_data) |
