summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorGlenn Smith <glenn@vector35.com>2024-12-27 16:14:46 -0500
committerGlenn Smith <glenn@vector35.com>2025-01-30 17:20:05 -0500
commit8862696926173104957729683832591438161557 (patch)
tree78ba6d7dc8144430136086c8dc84726171eec8ab /python/binaryview.py
parent5a5426d030b6be26d4564ba1eba2d8a275533256 (diff)
Render Layers
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py17
1 files changed, 3 insertions, 14 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 73ddfd39..c1a57765 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -9011,20 +9011,9 @@ to a the type "tagRECT" found in the typelibrary "winX64common"
def _LinearDisassemblyLine_convertor(
self, lines: core.BNLinearDisassemblyLineHandle
) -> 'lineardisassembly.LinearDisassemblyLine':
- func = None
- block = None
- line = lines[0]
- if line.function:
- func = _function.Function(self, core.BNNewFunctionReference(line.function))
- if line.block:
- block_handle = core.BNNewBasicBlockReference(line.block)
- assert block_handle is not None, "core.BNNewBasicBlockReference returned None"
- block = basicblock.BasicBlock(block_handle, self)
- color = highlight.HighlightColor._from_core_struct(line.contents.highlight)
- addr = line.contents.addr
- tokens = _function.InstructionTextToken._from_core_struct(line.contents.tokens, line.contents.count)
- contents = _function.DisassemblyTextLine(tokens, addr, color=color)
- return lineardisassembly.LinearDisassemblyLine(line.type, func, block, contents)
+ line = lineardisassembly.LinearDisassemblyLine._from_core_struct(lines[0])
+ core.BNFreeLinearDisassemblyLines(lines, 1)
+ return line
def find_all_text(
self, start: int, end: int, text: str, settings: Optional[_function.DisassemblySettings] = None,