qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH-for-5.0] gdbstub: Use correct address space with Qqemu.PhyMemMode


From: Philippe Mathieu-Daudé
Subject: [PATCH-for-5.0] gdbstub: Use correct address space with Qqemu.PhyMemMode packet
Date: Mon, 30 Mar 2020 17:30:16 +0200

Since commit 3f940dc98, we added support for vAttach packet
to select a particular thread/cpu/core. However when using
the GDB physical memory mode, it is not clear which CPU
address space is used.
Since the CPU address space is stored in CPUState::as, use
address_space_rw() instead of cpu_physical_memory_rw().

Fixes: ab4752ec8d9
Signed-off-by: Philippe Mathieu-Daudé <address@hidden>
---
 gdbstub.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/gdbstub.c b/gdbstub.c
index 013fb1ac0f..3baaef50e3 100644
--- a/gdbstub.c
+++ b/gdbstub.c
@@ -69,11 +69,8 @@ static inline int target_memory_rw_debug(CPUState *cpu, 
target_ulong addr,
 
 #ifndef CONFIG_USER_ONLY
     if (phy_memory_mode) {
-        if (is_write) {
-            cpu_physical_memory_write(addr, buf, len);
-        } else {
-            cpu_physical_memory_read(addr, buf, len);
-        }
+        address_space_rw(cpu->as, addr, MEMTXATTRS_UNSPECIFIED,
+                         buf, len, is_write);
         return 0;
     }
 #endif
-- 
2.21.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]