summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/binaryview.py26
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)