summary refs log tree commit diff stats
path: root/contrib/plugins/lockstep.c
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2024-07-05 09:40:31 +0100
committerAlex Bennée <alex.bennee@linaro.org>2024-07-05 12:34:41 +0100
commit5e77f22ac95d18fdbe7e5c542002786f2126a780 (patch)
tree7803c9e55b3aa3d989016fcba6420061ee82bc24 /contrib/plugins/lockstep.c
parentbb3dd92d32e1ea805a1eecbb23b35f7675d8a83e (diff)
downloadfocaccia-qemu-5e77f22ac95d18fdbe7e5c542002786f2126a780.tar.gz
focaccia-qemu-5e77f22ac95d18fdbe7e5c542002786f2126a780.zip
plugins/lockstep: make mixed-mode safe
The ExecState is shared across the socket and if we want to compare
say 64 bit and 32 bit binaries we need the two to use the same sizes
for things.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240705084047.857176-25-alex.bennee@linaro.org>
Diffstat (limited to 'contrib/plugins/lockstep.c')
-rw-r--r--contrib/plugins/lockstep.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/plugins/lockstep.c b/contrib/plugins/lockstep.c
index 67a779ee9d..8b90b37f67 100644
--- a/contrib/plugins/lockstep.c
+++ b/contrib/plugins/lockstep.c
@@ -57,7 +57,7 @@ typedef struct {
 /* The execution state we compare */
 typedef struct {
     uint64_t pc;
-    unsigned long insn_count;
+    uint64_t insn_count;
 } ExecState;
 
 typedef struct {
@@ -148,7 +148,7 @@ static void report_divergance(ExecState *us, ExecState *them)
 
         g_string_printf(out,
                         "Δ insn_count @ 0x%016" PRIx64
-                        " (%ld) vs 0x%016" PRIx64 " (%ld)\n",
+                        " (%"PRId64") vs 0x%016" PRIx64 " (%"PRId64")\n",
                         us->pc, us->insn_count, them->pc, them->insn_count);
 
         for (entry = log, i = 0;