From e680e3f976c2834f2b64b3741b8af028e4aaaaa8 Mon Sep 17 00:00:00 2001 From: Mariia Rybalka Date: Tue, 15 Aug 2023 14:46:37 +0200 Subject: [PATCH] Remove todos --- decompiler/frontend/binaryninja/handlers/assignments.py | 1 - decompiler/frontend/binaryninja/handlers/unary.py | 1 - decompiler/structures/pseudo/operations.py | 2 -- 3 files changed, 4 deletions(-) diff --git a/decompiler/frontend/binaryninja/handlers/assignments.py b/decompiler/frontend/binaryninja/handlers/assignments.py index 8e82ef12a..aed87a080 100644 --- a/decompiler/frontend/binaryninja/handlers/assignments.py +++ b/decompiler/frontend/binaryninja/handlers/assignments.py @@ -72,7 +72,6 @@ def lift_set_field(self, assignment: mediumlevelil.MediumLevelILSetVarField, is_ if isinstance(assignment.dest.type, binaryninja.NamedTypeReferenceType) and not ( isinstance(dest_type, Pointer) and isinstance(dest_type.type, Integer) ): - # TODO should we handle unions here? As in lift_get_field? struct_variable = self._lifter.lift(assignment.dest, is_aliased=True, parent=assignment) destination = MemberAccess( offset=assignment.offset, diff --git a/decompiler/frontend/binaryninja/handlers/unary.py b/decompiler/frontend/binaryninja/handlers/unary.py index d742d3514..977d135e0 100644 --- a/decompiler/frontend/binaryninja/handlers/unary.py +++ b/decompiler/frontend/binaryninja/handlers/unary.py @@ -96,7 +96,6 @@ def _lift_zx_operation(self, instruction: MediumLevelILInstruction, **kwargs) -> def _lift_load_struct(self, instruction: mediumlevelil.MediumLevelILLoadStruct, **kwargs) -> MemberAccess: """Lift a MLIL_LOAD_STRUCT_SSA (struct member access e.g. var#n->x) instruction.""" - # TODO handle union struct_variable = self._lifter.lift(instruction.src) struct_ptr: Pointer = self._lifter.lift(instruction.src.expr_type) struct_type: Struct = struct_ptr.type diff --git a/decompiler/structures/pseudo/operations.py b/decompiler/structures/pseudo/operations.py index 9f9963520..6e194b526 100644 --- a/decompiler/structures/pseudo/operations.py +++ b/decompiler/structures/pseudo/operations.py @@ -403,8 +403,6 @@ def struct_variable(self) -> Expression: return self.operand def substitute(self, replacee: Expression, replacement: Expression) -> None: - # TODO test what if replacement is also member access - # TODO test if substitute of unary operation is enough if isinstance(replacee, Variable) and replacee == self.struct_variable and isinstance(replacement, Variable): self.operands[:] = [replacement]