Message ID | 20200807143705.30066-3-f4bug@amsat.org |
---|---|
State | New |
Headers | show |
Series | hw/misc/unimp: Improve how offset/value are displayed | expand |
On 8/7/20 7:37 AM, Philippe Mathieu-Daudé wrote: > To quickly notice the access size, display the value with the > width of the access (i.e. 16-bit access is displayed 0x0000, > while 8-bit access 0x00). > > Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> > --- > hw/misc/unimp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
diff --git a/hw/misc/unimp.c b/hw/misc/unimp.c index ee2e536c8b..b4b318db1c 100644 --- a/hw/misc/unimp.c +++ b/hw/misc/unimp.c @@ -35,8 +35,8 @@ static void unimp_write(void *opaque, hwaddr offset, qemu_log_mask(LOG_UNIMP, "%s: unimplemented device write " "(size %d, offset 0x%" HWADDR_PRIx - ", value 0x%" PRIx64 ")\n", - s->name, size, offset, value); + ", value 0x%0*" PRIx64 ")\n", + s->name, size, offset, size << 1, value); } static const MemoryRegionOps unimp_ops = {
To quickly notice the access size, display the value with the width of the access (i.e. 16-bit access is displayed 0x0000, while 8-bit access 0x00). Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- hw/misc/unimp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)