summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorkat <katherine@vector35.com>2022-08-09 12:35:46 -0400
committercynder <KritantaDevelopment@gmail.com>2022-08-09 10:14:57 -0700
commitf0242daca9922b6a6bf6acc79987ff47f9f6f70f (patch)
tree3e61b1b5eccb834e3d4bb4bc0df93d98ddf08e66 /python/binaryview.py
parentf49ae00f6d15a81876788df15f1678619a4c791d (diff)
Add New Theme and some C++ API Documentation
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py25
1 files changed, 16 insertions, 9 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index fe182925..d8a5d387 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -3138,7 +3138,7 @@ class BinaryView:
def perform_get_default_endianness(self) -> Endianness:
"""
- ``perform_get_default_endianness`` implements a check which returns true if the BinaryView is executable.
+ ``perform_get_default_endianness`` implements a check which returns the Endianness of the BinaryView
.. note:: This method **may** be implemented for custom BinaryViews that are not LittleEndian.
@@ -3303,18 +3303,25 @@ class BinaryView:
def navigate(self, view_name: str, offset: int) -> bool:
"""
- ``navigate`` navigates the UI to the specified virtual address
+ ``navigate`` navigates the UI to the specified virtual address in the specified View
- .. note:: Despite the confusing name, ``view`` in this context is not a BinaryView but rather a string describing the different UI Views. Check :py:attr:`view` while in different views to see examples such as ``Linear:ELF``, ``Graph:PE``.
+ The View name is created by combining a View type (e.g. "Graph") with a BinaryView type (e.g. "Mach-O"),
+ seperated by a colon, resulting in something like "Graph:Mach-O".
- :param str view: virtual address to read from.
+ :param str view_name: View name.
:param int offset: address to navigate to
- :return: whether or not navigation succeeded
+ :return: whether navigation succeeded
:rtype: bool
:Example:
- >>> import random
- >>> bv.navigate(bv.view, random.choice(list(bv.functions)).start)
+ >>> bv.navigate(bv.view, bv.start)
+ True
+ >>> bv.file.existing_views
+ ['Mach-O', 'Raw']
+ >>> import binaryninjaui
+ >>> [i.getName() for i in binaryninjaui.ViewType.getTypes()]
+ ['Graph', 'Hex', 'Linear', 'Strings', 'Types', 'Triage', 'Bytes']
+ >>> bv.navigate('Graph:Mach-O', bv.entry_point)
True
"""
return self._file.navigate(view_name, offset)
@@ -3598,7 +3605,7 @@ class BinaryView:
def add_entry_point(self, addr: int, plat: Optional['_platform.Platform'] = None) -> None:
"""
- ``add_entry_point`` adds an virtual address to start analysis from for a given plat.
+ ``add_entry_point`` adds a virtual address to start analysis from for a given plat.
:param int addr: virtual address to start analysis from
:param Platform plat: Platform for the entry point analysis
@@ -3912,7 +3919,7 @@ class BinaryView:
``get_function_at`` gets a Function object for the function that starts at virtual address ``addr``:
:param int addr: starting virtual address of the desired function
- :param Platform plat: plat of the desired function
+ :param Platform plat: platform of the desired function
:return: returns a Function object or None for the function at the virtual address provided
:rtype: Function
:Example: