qemu/accel/tcg
Peter Maydell e60a7d0d4d accel/tcg: Zero-pad PC in TCG CPU exec trace lines
In commit f0a08b0913 we changed the type of the PC from
target_ulong to vaddr.  In doing so we inadvertently dropped the
zero-padding on the PC in trace lines (the second item inside the []
in these lines).  They used to look like this on AArch64, for
instance:

Trace 0: 0x7f2260000100 [00000000/0000000040000000/00000061/ff200000]

and now they look like this:
Trace 0: 0x7f4f50000100 [00000000/40000000/00000061/ff200000]

and if the PC happens to be somewhere low like 0x5000
then the field is shown as /5000/.

This is because TARGET_FMT_lx is a "%08x" or "%016x" specifier,
depending on TARGET_LONG_SIZE, whereas VADDR_PRIx is just PRIx64
with no width specifier.

Restore the zero-padding by adding an 016 width specifier to
this tracing and a couple of others that were similarly recently
changed to use VADDR_PRIx without a width specifier.

We can't unfortunately restore the "32-bit guests are padded to
8 hex digits and 64-bit guests to 16 hex digits" behaviour so
easily.

Fixes: f0a08b0913 ("accel/tcg/cpu-exec.c: Widen pc to vaddr")
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Anton Johansson <anjo@rev.ng>
Message-id: 20230711165434.4123674-1-peter.maydell@linaro.org
2023-07-17 11:05:08 +01:00
..
atomic_common.c.inc tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128 2023-07-15 08:02:49 +01:00
atomic_template.h accel/tcg: Remove prot argument to atomic_mmu_lookup 2023-05-23 18:54:55 -07:00
cpu-exec-common.c accel/tcg: Add cpu_in_serial_context 2023-05-11 09:53:41 +01:00
cpu-exec.c accel/tcg: Zero-pad PC in TCG CPU exec trace lines 2023-07-17 11:05:08 +01:00
cputlb.c tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128 2023-07-15 08:02:49 +01:00
debuginfo.c accel/tcg: Add debuginfo support 2023-01-16 10:14:12 -10:00
debuginfo.h coroutine: Split qemu/coroutine-core.h off qemu/coroutine.h 2023-01-20 07:21:46 +01:00
internal.h accel/tcg: Always lock pages before translation 2023-07-15 08:02:33 +01:00
ldst_atomicity.c.inc accel/tcg: Return bool from page_check_range 2023-07-15 08:02:32 +01:00
ldst_common.c.inc accel/tcg: Unify cpu_{ld,st}*_{be,le}_mmu 2023-05-23 18:54:28 -07:00
meson.build meson: Replace CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY 2023-06-20 10:01:30 +02:00
monitor.c accel/tcg: remove CONFIG_PROFILER 2023-06-26 17:33:00 +02:00
perf.c accel/tcg: Unmap perf_marker 2023-06-05 12:06:49 -07:00
perf.h tcg: add perfmap and jitdump 2023-01-16 10:14:12 -10:00
plugin-gen.c tcg: Remove target-specific headers from tcg.[ch] 2023-06-05 12:04:29 -07:00
plugin-helpers.h tcg: exclude non-memory effecting helpers from instrumentation 2023-02-02 11:48:20 +00:00
tb-context.h tcg: Move tb_phys_invalidate_count to tb_ctx 2021-07-09 09:38:33 -07:00
tb-hash.h accel/tcg: Widen pc to vaddr in CPUJumpCache 2023-06-26 17:32:59 +02:00
tb-jmp-cache.h accel/tcg: Widen pc to vaddr in CPUJumpCache 2023-06-26 17:32:59 +02:00
tb-maint.c accel/tcg: Always lock pages before translation 2023-07-15 08:02:33 +01:00
tcg-accel-ops-icount.c accel/tcg/tcg-accel-ops-rr: ensure fairness with icount 2023-05-11 09:53:41 +01:00
tcg-accel-ops-icount.h accel/tcg/tcg-accel-ops-rr: ensure fairness with icount 2023-05-11 09:53:41 +01:00
tcg-accel-ops-mttcg.c accel: Remove unused hThread variable on TCG/WHPX 2023-06-28 13:55:35 +02:00
tcg-accel-ops-mttcg.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops-rr.c accel: Remove unused hThread variable on TCG/WHPX 2023-06-28 13:55:35 +02:00
tcg-accel-ops-rr.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-accel-ops.c accel/tcg: remove CONFIG_PROFILER 2023-06-26 17:33:00 +02:00
tcg-accel-ops.h Clean up header guards that don't match their file name 2022-05-11 16:49:06 +02:00
tcg-all.c accel/tcg: Remove check_tcg_memory_orders_compatible 2023-06-26 17:33:00 +02:00
tcg-runtime-gvec.c tcg: Split helper-proto.h 2023-06-05 12:04:29 -07:00
tcg-runtime.c tcg: Split helper-proto.h 2023-06-05 12:04:29 -07:00
tcg-runtime.h tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128 2023-07-15 08:02:49 +01:00
trace-events accel/tcg: Remove trace events from trace-root.h 2022-12-20 17:11:12 -08:00
trace.h trace: switch position of headers to what Meson requires 2020-08-21 06:18:24 -04:00
translate-all.c accel/tcg: Zero-pad PC in TCG CPU exec trace lines 2023-07-17 11:05:08 +01:00
translator.c accel/tcg: Always lock pages before translation 2023-07-15 08:02:33 +01:00
user-exec-stub.c replay: Extract core API to 'exec/replay-core.h' 2023-02-27 22:29:01 +01:00
user-exec.c tcg: Use HAVE_CMPXCHG128 instead of CONFIG_CMPXCHG128 2023-07-15 08:02:49 +01:00