diff options
| author | Glenn Smith <glenn@vector35.com> | 2022-06-23 14:44:13 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2022-06-27 15:10:38 -0400 |
| commit | cdadea5c37acf04cb637fae4f31236091c85edac (patch) | |
| tree | b3b1e41b1546d41913466f9e651bec4cda625b46 | |
| parent | aad1e9b9861ece0afa6d731d98e5c5c4ed377753 (diff) | |
Add struct pointer array test
| m--------- | suite/binaries | 0 | ||||
| -rw-r--r-- | suite/testcommon.py | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/suite/binaries b/suite/binaries -Subproject 08becde098fdcb4801824f4c771c664429e4b41 +Subproject 93c0d2647f32bbc42d8f23088f91a44bd305412 diff --git a/suite/testcommon.py b/suite/testcommon.py index db0c79de..33c7091d 100644 --- a/suite/testcommon.py +++ b/suite/testcommon.py @@ -1368,6 +1368,25 @@ class TestBuilder(Builder): retinfo.append(f"Function: {func.start:x} Instruction: {hlilins.address:x} HLIL->MLILS instruction: {sorted(list(map(str, hlilins.mlils)))}") self.delete_package("array_test.bndb") + + retinfo = [] + file_name = self.unpackage_file("struct_array8.bndb") + if not os.path.exists(file_name): + return retinfo + + with BinaryViewType.get_view_of_file(file_name) as bv: + if bv is None: + return retinfo + + for func in bv.functions: + for line in func.hlil.root.lines: + retinfo.append(f"Function: {func.start:x} HLIL line: {line}") + for hlilins in func.hlil.instructions: + retinfo.append(f"Function: {func.start:x} Instruction: {hlilins.address:x} HLIL->LLIL instruction: {hlilins.llil}") + retinfo.append(f"Function: {func.start:x} Instruction: {hlilins.address:x} HLIL->MLIL instruction: {hlilins.mlil}") + retinfo.append(f"Function: {func.start:x} Instruction: {hlilins.address:x} HLIL->MLILS instruction: {sorted(list(map(str, hlilins.mlils)))}") + + self.delete_package("struct_array8.bndb") return sorted(retinfo) def test_x87_uniqueness(self): |
