summaryrefslogtreecommitdiff
path: root/python/lineardisassembly.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty.wagner@gmail.com>2024-08-22 12:55:49 -0600
committerRusty Wagner <rusty.wagner@gmail.com>2024-10-21 13:56:55 -0400
commitd8e3001e535fad178c621ff07418f81f25123dc4 (patch)
tree54c03cef2f0bdfd9a3b6df4334c81becb63e4993 /python/lineardisassembly.py
parent0e281a30d73c0f31ef9442fef0346779164231ad (diff)
Allow multiple high level representations for display, add Pseudo Rust and a Pseudo Python example plugin
Diffstat (limited to 'python/lineardisassembly.py')
-rw-r--r--python/lineardisassembly.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/python/lineardisassembly.py b/python/lineardisassembly.py
index a19148ca..40a0d6c5 100644
--- a/python/lineardisassembly.py
+++ b/python/lineardisassembly.py
@@ -345,12 +345,13 @@ class LinearViewObject:
@staticmethod
def language_representation(
- view: 'binaryview.BinaryView', settings: Optional['_function.DisassemblySettings'] = None
+ view: 'binaryview.BinaryView', settings: Optional['_function.DisassemblySettings'] = None,
+ language: str = "Pseudo C"
) -> 'LinearViewObject':
_settings = settings
if _settings is not None:
_settings = _settings.handle
- return LinearViewObject(core.BNCreateLinearViewLanguageRepresentation(view.handle, _settings))
+ return LinearViewObject(core.BNCreateLinearViewLanguageRepresentation(view.handle, _settings, language))
@staticmethod
def data_only(
@@ -453,12 +454,13 @@ class LinearViewObject:
@staticmethod
def single_function_language_representation(
- func: '_function.Function', settings: Optional['_function.DisassemblySettings'] = None
+ func: '_function.Function', settings: Optional['_function.DisassemblySettings'] = None,
+ language: str = "Pseudo C"
) -> 'LinearViewObject':
_settings = settings
if _settings is not None:
_settings = _settings.handle
- return LinearViewObject(core.BNCreateLinearViewSingleFunctionLanguageRepresentation(func.handle, _settings))
+ return LinearViewObject(core.BNCreateLinearViewSingleFunctionLanguageRepresentation(func.handle, _settings, language))
class LinearViewCursor: