about summary refs log tree commit diff stats
path: root/snapshot.py
diff options
context:
space:
mode:
authorTheofilos Augoustis <theofilos.augoustis@gmail.com>2023-12-08 16:17:35 +0100
committerTheofilos Augoustis <theofilos.augoustis@gmail.com>2023-12-08 16:17:35 +0100
commit4a5584d8f69d8ff511285387971d8cbf803f16b7 (patch)
tree11c9e104fadc9b47f3f423f4be3bf0be34edf4f8 /snapshot.py
parent0cf4f736fd5d7cd99f00d6c5896af9a608d2df8b (diff)
downloadfocaccia-4a5584d8f69d8ff511285387971d8cbf803f16b7.tar.gz
focaccia-4a5584d8f69d8ff511285387971d8cbf803f16b7.zip
Adapt symbolic compare to new transform interface
Also implement a `MiasmSymbolicTransform.concat` function that
concatenates two transformations. Some minor adaptions to the eval_expr
code was necessary to remove some assumptions that don't work if the
resolver state returns symbols instead of concrete values.

Remove obsolete utilities that were used for angr.

Co-authored-by: Theofilos Augoustis <theofilos.augoustis@gmail.com>
Co-authored-by: Nicola Crivellin <nicola.crivellin98@gmail.com>
Diffstat (limited to 'snapshot.py')
-rw-r--r--snapshot.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/snapshot.py b/snapshot.py
index a4bfb0f..80c1ac5 100644
--- a/snapshot.py
+++ b/snapshot.py
@@ -1,5 +1,4 @@
 from arch.arch import Arch
-from interpreter import SymbolResolver, SymbolResolveError
 
 class MemoryAccessError(Exception):
     def __init__(self, msg: str):
@@ -112,12 +111,3 @@ class ProgramState:
 
     def __repr__(self):
         return repr(self.regs)
-
-class SnapshotSymbolResolver(SymbolResolver):
-    def __init__(self, snapshot: ProgramState):
-        self._state = snapshot
-
-    def resolve(self, symbol: str):
-        if symbol not in self._state.arch.regnames:
-            raise SymbolResolveError(symbol, 'Symbol is not a register name.')
-        return self._state.read(symbol)