summaryrefslogtreecommitdiff
path: root/python/flowgraph.py
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2019-02-26 23:09:38 -0500
committerRusty Wagner <rusty@vector35.com>2019-02-26 23:09:38 -0500
commit49f6de04c7106e6ab8ce31fac6299f372a665698 (patch)
tree1a0711864b3c113c273d4453f14773445037295e /python/flowgraph.py
parent2f84b5c600f08101a6a7ee08738a3e3a32686f46 (diff)
Fix some flow graph and disassembly API issues
Diffstat (limited to 'python/flowgraph.py')
-rw-r--r--python/flowgraph.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/flowgraph.py b/python/flowgraph.py
index 103eed69..4d2bd3ba 100644
--- a/python/flowgraph.py
+++ b/python/flowgraph.py
@@ -78,7 +78,7 @@ class FlowGraphNode(object):
@property
def basic_block(self):
- """Basic block associated with this part of the flow graph (read-only)"""
+ """Basic block associated with this part of the flow graph"""
block = core.BNGetFlowGraphBasicBlock(self.handle)
if not block:
return None
@@ -100,6 +100,13 @@ class FlowGraphNode(object):
block = basicblock.BasicBlock(block, view)
return block
+ @basic_block.setter
+ def basic_block(self, block):
+ if block is None:
+ core.BNSetFlowGraphBasicBlock(self.handle, None)
+ else:
+ core.BNSetFlowGraphBasicBlock(self.handle, block.handle)
+
@property
def x(self):
"""Flow graph block X (read-only)"""