about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTheofilos Augoustis <theofilos.augoustis@gmail.com>2025-10-30 08:52:26 +0000
committerTheofilos Augoustis <theofilos.augoustis@gmail.com>2025-11-06 17:23:54 +0000
commitdc413dbe29df135e09245b9814e152d6e3e40d8b (patch)
tree0608d58572168160c4aa48fc33284473bfebec1a
parentd8c4634e8927f7ee9bcf24f5ac265309d3c1c0a7 (diff)
downloadfocaccia-dc413dbe29df135e09245b9814e152d6e3e40d8b.tar.gz
focaccia-dc413dbe29df135e09245b9814e152d6e3e40d8b.zip
Enable cross-validation with single-stepping in debug mode
-rw-r--r--src/focaccia/symbolic.py2
-rwxr-xr-xsrc/focaccia/tools/capture_transforms.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/focaccia/symbolic.py b/src/focaccia/symbolic.py
index e6c919a..7485cc2 100644
--- a/src/focaccia/symbolic.py
+++ b/src/focaccia/symbolic.py
@@ -589,7 +589,7 @@ def run_instruction(instr: miasm_instr,
         loc = lifter.add_instr_to_ircfg(instr, ircfg, None, False)
         assert(isinstance(loc, Expr) or isinstance(loc, LocKey))
     except NotImplementedError as err:
-        raise Exception(f'Unable to lift instruction {instr}: {err}. Skipping.') from None
+        raise Exception(f'Unable to lift instruction {instr}: {err}. Skipping')
 
     # Execute instruction symbolically
     new_pc, modified = execute_location(loc)
diff --git a/src/focaccia/tools/capture_transforms.py b/src/focaccia/tools/capture_transforms.py
index d742994..23d150d 100755
--- a/src/focaccia/tools/capture_transforms.py
+++ b/src/focaccia/tools/capture_transforms.py
@@ -73,10 +73,12 @@ def main():
         detlog = NullDeterministicLog()
 
     env = TraceEnvironment(args.binary, args.args, utils.get_envp(), nondeterminism_log=detlog)
-    tracer = SymbolicTracer(env, remote=args.remote, cross_validate=args.cross_validate,
+    tracer = SymbolicTracer(env, remote=args.remote, cross_validate=args.debug,
                             force=args.force)
 
-    trace = tracer.trace(start_addr=args.start_address, stop_addr=args.stop_address)
+    trace = tracer.trace(start_addr=args.start_address,
+                         stop_addr=args.stop_address)
+
     with open(args.output, 'w') as file:
         parser.serialize_transformations(trace, file)