summaryrefslogtreecommitdiff
path: root/python/binaryview.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2018-06-04 14:12:26 -0400
committerRusty Wagner <rusty@vector35.com>2018-06-04 14:12:26 -0400
commitbfa6fce83383e7be1458a917f8e6dbf71bdab28b (patch)
tree58f7d373f6298bbbac70911cd661627b316c011b /python/binaryview.py
parentc09ae6ce7bd652dbb6e1a4f73d5a8a51440ec1ff (diff)
Generic flow graph API and report collections
Diffstat (limited to 'python/binaryview.py')
-rw-r--r--python/binaryview.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/python/binaryview.py b/python/binaryview.py
index 0cf25e70..ede279ad 100644
--- a/python/binaryview.py
+++ b/python/binaryview.py
@@ -41,6 +41,7 @@ import basicblock
import types
import lineardisassembly
import metadata
+import highlight
class BinaryDataNotification(object):
@@ -2961,6 +2962,7 @@ class BinaryView(object):
func = 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 xrange(0, lines[i].contents.count):
@@ -2973,7 +2975,7 @@ class BinaryView(object):
confidence = lines[i].contents.tokens[j].confidence
address = lines[i].contents.tokens[j].address
tokens.append(function.InstructionTextToken(token_type, text, value, size, operand, context, address, confidence))
- contents = function.DisassemblyTextLine(addr, tokens)
+ contents = function.DisassemblyTextLine(tokens, addr, color = color)
result.append(lineardisassembly.LinearDisassemblyLine(lines[i].type, func, block, lines[i].lineOffset, contents))
func = None
@@ -3352,6 +3354,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