summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2017-07-24 20:10:18 -0400
committerRusty Wagner <rusty@vector35.com>2017-07-24 20:10:18 -0400
commit111add984b0a517966f133ae69c51d2084dee985 (patch)
tree72af9e99dc062a395a7ffa5435af17481325d8c9 /python
parent23091d4734fede77b4da90bc14d5ba2e49b33fc2 (diff)
Adding size of stack var refs, source operand in MLIL
Diffstat (limited to 'python')
-rw-r--r--python/function.py5
-rw-r--r--python/mediumlevelil.py1
2 files changed, 4 insertions, 2 deletions
diff --git a/python/function.py b/python/function.py
index aa0d05eb..c3310b6c 100644
--- a/python/function.py
+++ b/python/function.py
@@ -148,12 +148,13 @@ class PossibleValueSet(object):
class StackVariableReference(object):
- def __init__(self, src_operand, t, name, var, ref_ofs):
+ def __init__(self, src_operand, t, name, var, ref_ofs, size):
self.source_operand = src_operand
self.type = t
self.name = name
self.var = var
self.referenced_offset = ref_ofs
+ self.size = size
if self.source_operand == 0xffffffff:
self.source_operand = None
@@ -621,7 +622,7 @@ class Function(object):
var_type = types.Type(core.BNNewTypeReference(refs[i].type), confidence = refs[i].typeConfidence)
result.append(StackVariableReference(refs[i].sourceOperand, var_type,
refs[i].name, Variable.from_identifier(self, refs[i].varIdentifier, refs[i].name, var_type),
- refs[i].referencedOffset))
+ refs[i].referencedOffset, refs[i].size))
core.BNFreeStackVariableReferenceList(refs, count.value)
return result
diff --git a/python/mediumlevelil.py b/python/mediumlevelil.py
index ba83f7aa..3377ab6a 100644
--- a/python/mediumlevelil.py
+++ b/python/mediumlevelil.py
@@ -174,6 +174,7 @@ class MediumLevelILInstruction(object):
self.operation = MediumLevelILOperation(instr.operation)
self.size = instr.size
self.address = instr.address
+ self.source_operand = instr.sourceOperand
operands = MediumLevelILInstruction.ILOperations[instr.operation]
self.operands = []
i = 0