summaryrefslogtreecommitdiff
path: root/suite
diff options
context:
space:
mode:
authorRusty Wagner <rusty@vector35.com>2019-12-19 16:04:11 -0500
committerRusty Wagner <rusty@vector35.com>2019-12-19 16:04:11 -0500
commit741fb0538e0ac6ab14928f78697196803dbd2ed5 (patch)
treedd0b8da88791b03553d659e6672c8d5ba0fdecfa /suite
parent98771ab9f325e310ae07120cf559f601837380f9 (diff)
LLIL_JUMP_TO/MLIL_JUMP_TO now contain mappings from address to destination instruction
Diffstat (limited to 'suite')
m---------suite/binaries0
-rw-r--r--suite/testcommon.py37
2 files changed, 34 insertions, 3 deletions
diff --git a/suite/binaries b/suite/binaries
-Subproject f17026111d327e1604d89daad9737831fe83292
+Subproject 24abb8fd8fe00a7188b5255bdcf9df36edc5feb
diff --git a/suite/testcommon.py b/suite/testcommon.py
index cb034f30..06ef1b5b 100644
--- a/suite/testcommon.py
+++ b/suite/testcommon.py
@@ -189,8 +189,29 @@ class BinaryViewTestBuilder(Builder):
retinfo.append("Function: {:x} Instruction: {:x} Mapped MLIL: {}".format(func.start, ins.address, str(ins.mapped_medium_level_il)))
retinfo.append("Function: {:x} Instruction: {:x} Value: {}".format(func.start, ins.address, str(ins.value)))
retinfo.append("Function: {:x} Instruction: {:x} Possible Values: {}".format(func.start, ins.address, str(ins.possible_values)))
- retinfo.append("Function: {:x} Instruction: {:x} Prefix operands: {}".format(func.start, ins.address, str(ins.prefix_operands)))
- retinfo.append("Function: {:x} Instruction: {:x} Postfix operands: {}".format(func.start, ins.address, str(ins.postfix_operands)))
+
+ prefixList = []
+ for i in ins.prefix_operands:
+ if isinstance(i, dict):
+ contents = []
+ for j in sorted(i.keys()):
+ contents.append((j, i[j]))
+ prefixList.append(str(contents))
+ else:
+ prefixList.append(i)
+ retinfo.append("Function: {:x} Instruction: {:x} Prefix operands: {}".format(func.start, ins.address, str(prefixList)))
+
+ postfixList = []
+ for i in ins.postfix_operands:
+ if isinstance(i, dict):
+ contents = []
+ for j in sorted(i.keys()):
+ contents.append((j, i[j]))
+ postfixList.append(str(contents))
+ else:
+ postfixList.append(i)
+ retinfo.append("Function: {:x} Instruction: {:x} Postfix operands: {}".format(func.start, ins.address, str(postfixList)))
+
retinfo.append("Function: {:x} Instruction: {:x} SSA form: {}".format(func.start, ins.address, str(ins.ssa_form)))
retinfo.append("Function: {:x} Instruction: {:x} Non-SSA form: {}".format(func.start, ins.address, str(ins.non_ssa_form)))
return fixOutput(retinfo)
@@ -236,15 +257,25 @@ class BinaryViewTestBuilder(Builder):
prefixList.append(str(round(i, 21)))
elif isinstance(i, float):
prefixList.append(str(round(i, 11)))
+ elif isinstance(i, dict):
+ contents = []
+ for j in sorted(i.keys()):
+ contents.append((j, i[j]))
+ prefixList.append(str(contents))
else:
prefixList.append(str(i))
retinfo.append("Function: {:x} Instruction: {:x} Prefix operands: {}".format(func.start, ins.address, str(sorted(prefixList))))
postfixList = []
- for i in ins.prefix_operands:
+ for i in ins.postfix_operands:
if isinstance(i, float) and 'e' in str(i):
postfixList.append(str(round(i, 21)))
elif isinstance(i, float):
postfixList.append(str(round(i, 11)))
+ elif isinstance(i, dict):
+ contents = []
+ for j in sorted(i.keys()):
+ contents.append((j, i[j]))
+ postfixList.append(str(contents))
else:
postfixList.append(str(i))