qemu-e2k/accel
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
..
hvf exec/memory: Add symbolic value for memory listener priority for accel 2023-06-28 14:27:59 +02:00
kvm exec/memory: Add symbol for the min value of memory listener priority 2023-06-28 14:27:59 +02:00
qtest meson: Replace CONFIG_SOFTMMU -> CONFIG_SYSTEM_ONLY 2023-06-20 10:01:30 +02:00
stubs accel/kvm: Declare kvm_direct_msi_allowed in stubs 2023-06-28 14:14:22 +02:00
tcg accel/tcg: Zero-pad PC in TCG CPU exec trace lines 2023-07-17 11:05:08 +01:00
xen accel/xen: Fix DM state change notification in dm_restrict mode 2023-03-23 09:56:54 +00:00
Kconfig Add NVMM accelerator: configure and build logic 2021-05-04 14:15:34 +02:00
accel-blocker.c accel: introduce accelerator blocker API 2023-01-11 09:59:39 +01:00
accel-common.c gdbstub: move sstep flags probing into AccelClass 2022-10-06 11:53:41 +01:00
accel-softmmu.c *: Add missing includes of qemu/error-report.h 2023-03-22 15:06:57 +00:00
accel-softmmu.h accel: replace struct CpusAccel with AccelOpsClass 2021-02-05 10:24:15 -10:00
accel-user.c accel: extend AccelState and AccelClass to user-mode 2021-02-05 10:24:15 -10:00
dummy-cpus.c accel/qtest: Support qtest accelerator for Windows 2022-10-28 11:17:12 +02:00
meson.build meson: Replace softmmu_ss -> system_ss 2023-06-20 10:01:30 +02:00