diff options
| author | Rusty Wagner <rusty@vector35.com> | 2018-09-05 14:39:46 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2018-09-05 14:39:46 -0400 |
| commit | f4d75c9229d2d76f36f80e97dd49c7aece242600 (patch) | |
| tree | 0390fc2b624149274c5c01b847d59698055a2974 /python/binaryview.py | |
| parent | c02c863367ff88c1e562a1110e069bf2842798aa (diff) | |
| parent | e51031010b107089dd7b5b69039ac42b856a0769 (diff) | |
Merge branch 'test_stack_adjust' into dev
Diffstat (limited to 'python/binaryview.py')
| -rw-r--r-- | python/binaryview.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py index 5e3e765d..5786a5c8 100644 --- a/python/binaryview.py +++ b/python/binaryview.py @@ -36,6 +36,7 @@ from binaryninja import databuffer from binaryninja import basicblock from binaryninja import lineardisassembly from binaryninja import metadata +from binaryninja import highlight # 2-3 compatibility from binaryninja import range @@ -3046,6 +3047,7 @@ class BinaryView(object): func = binaryninja.function.Function(self, core.BNNewFunctionReference(lines[i].function)) if lines[i].block: block = basicblock.BasicBlock(self, core.BNNewBasicBlockReference(lines[i].block)) + color = highlight.HighlightColor._from_core_struct(lines[i].contents.highlight) addr = lines[i].contents.addr tokens = [] for j in range(0, lines[i].contents.count): @@ -3058,7 +3060,7 @@ class BinaryView(object): confidence = lines[i].contents.tokens[j].confidence address = lines[i].contents.tokens[j].address tokens.append(binaryninja.function.InstructionTextToken(token_type, text, value, size, operand, context, address, confidence)) - contents = binaryninja.function.DisassemblyTextLine(addr, tokens) + contents = binaryninja.function.DisassemblyTextLine(tokens, addr, color = color) result.append(lineardisassembly.LinearDisassemblyLine(lines[i].type, func, block, lines[i].lineOffset, contents)) func = None @@ -3437,6 +3439,9 @@ class BinaryView(object): def show_html_report(self, title, contents, plaintext = ""): core.BNShowHTMLReport(self.handle, title, contents, plaintext) + def show_graph_report(self, title, graph): + core.BNShowHTMLReport(self.handle, title, graph.handle) + def get_address_input(self, prompt, title, current_address = None): if current_address is None: current_address = self.file.offset |
