summary refs log tree commit diff stats
path: root/gdbstub/user.c
diff options
context:
space:
mode:
authorAlex Bennée <alex.bennee@linaro.org>2023-03-02 18:57:51 -0800
committerAlex Bennée <alex.bennee@linaro.org>2023-03-07 20:44:08 +0000
commit589a58672e044c0415e70f018393c8406cdd5c49 (patch)
tree59046a80b5dd7d40a687de7ce1ab50edf5f66c14 /gdbstub/user.c
parent8a2025b36b4f7a20f1bbbcf52d9d6c10094ffd49 (diff)
downloadfocaccia-qemu-589a58672e044c0415e70f018393c8406cdd5c49.tar.gz
focaccia-qemu-589a58672e044c0415e70f018393c8406cdd5c49.zip
gdbstub: specialise target_memory_rw_debug
The two implementations are different enough to encourage having a
specialisation and we can move some of the softmmu only stuff out of
gdbstub.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20230302190846.2593720-16-alex.bennee@linaro.org>
Message-Id: <20230303025805.625589-16-richard.henderson@linaro.org>
Diffstat (limited to 'gdbstub/user.c')
-rw-r--r--gdbstub/user.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gdbstub/user.c b/gdbstub/user.c
index c0fd83b373..92663d971c 100644
--- a/gdbstub/user.c
+++ b/gdbstub/user.c
@@ -379,6 +379,21 @@ int gdb_continue_partial(char *newstates)
 }
 
 /*
+ * Memory access helpers
+ */
+int gdb_target_memory_rw_debug(CPUState *cpu, hwaddr addr,
+                               uint8_t *buf, int len, bool is_write)
+{
+    CPUClass *cc;
+
+    cc = CPU_GET_CLASS(cpu);
+    if (cc->memory_rw_debug) {
+        return cc->memory_rw_debug(cpu, addr, buf, len, is_write);
+    }
+    return cpu_memory_rw_debug(cpu, addr, buf, len, is_write);
+}
+
+/*
  * Break/Watch point helpers
  */