[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 04/18] monitor.c: Use ld*_p() instead of ld*_raw()
From: |
Peter Maydell |
Subject: |
[Qemu-devel] [PULL 04/18] monitor.c: Use ld*_p() instead of ld*_raw() |
Date: |
Tue, 20 Jan 2015 15:45:33 +0000 |
The monitor code for doing a memory_dump() was using ld*_raw() to do
target-CPU accesses out of a local buf[] array. The correct functions
for this purpose are ld*_p(), which take a host pointer, rather than
ld*_raw(), which take an integer representing a guest address and
are somewhat meaningless in softmmu configurations. Nobody noticed
because for softmmu the _raw functions are the same as ldl_p but
with some extra casts thrown in. Switch to using the correct functions
instead.
Signed-off-by: Peter Maydell <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Message-id: address@hidden
---
monitor.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/monitor.c b/monitor.c
index 1808e41..7e4f605 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1292,16 +1292,16 @@ static void memory_dump(Monitor *mon, int count, int
format, int wsize,
switch(wsize) {
default:
case 1:
- v = ldub_raw(buf + i);
+ v = ldub_p(buf + i);
break;
case 2:
- v = lduw_raw(buf + i);
+ v = lduw_p(buf + i);
break;
case 4:
- v = (uint32_t)ldl_raw(buf + i);
+ v = (uint32_t)ldl_p(buf + i);
break;
case 8:
- v = ldq_raw(buf + i);
+ v = ldq_p(buf + i);
break;
}
monitor_printf(mon, " ");
--
1.9.1
- [Qemu-devel] [PULL 16/18] cpu_ldst_template.h: Drop unused cpu_ldfq/stfq/ldfl/stfl accessors, (continued)
- [Qemu-devel] [PULL 16/18] cpu_ldst_template.h: Drop unused cpu_ldfq/stfq/ldfl/stfl accessors, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 15/18] cpu_ldst.h: Drop unused _raw macros, saddr() and laddr(), Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 14/18] cpu_ldst_template.h: Use ld*_p directly rather than via ld*_raw macros, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 10/18] target-mips: Don't use _raw load/store accessors, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 09/18] linux-user/main.c (m68k): Use get_user_u16 rather than lduw in cpu_loop, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 13/18] cpu_ldst.h: Use inline functions for usermode cpu_ld/st accessors, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 06/18] linux-user/elfload.c: Don't use _raw accessor functions, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 08/18] linux-user/vm86.c: Use cpu_ldl_data &c rather than plain ldl &c, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 17/18] cpu_ldst.h, cpu-all.h, bswap.h: Update documentation on ld/st accessors, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 05/18] target-sparc: Don't use {ld, st}*_raw functions, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 04/18] monitor.c: Use ld*_p() instead of ld*_raw(),
Peter Maydell <=
- [Qemu-devel] [PULL 03/18] cpu_ldst.h: Remove unused ldul_ macros, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 12/18] cpu_ldst.h: Remove unused very short ld*/st* defines, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 07/18] bsd-user/elfload.c: Don't use ldl() or ldq_raw(), Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 02/18] exec.c: Drop TARGET_HAS_ICE define and checks, Peter Maydell, 2015/01/20
- [Qemu-devel] [PULL 11/18] cpu_ldst.h: Drop unused ld/st*_kernel defines, Peter Maydell, 2015/01/20
- Re: [Qemu-devel] [PULL 00/18] misc cross-tree patches queue, Peter Maydell, 2015/01/20