summary refs log tree commit diff stats
path: root/target/microblaze/gdbstub.c
diff options
context:
space:
mode:
authorAkihiko Odaki <akihiko.odaki@daynix.com>2024-02-27 14:43:18 +0000
committerAlex Bennée <alex.bennee@linaro.org>2024-02-28 09:09:58 +0000
commitecd6f6a8820c8fa91e4d96c1bb640913bd856343 (patch)
tree6e19dc3d6d42c39bfd11781ebf69d73225d59702 /target/microblaze/gdbstub.c
parentee59fa1dd57bac8ba8c81e02f2710ba08d1aa49d (diff)
downloadfocaccia-qemu-ecd6f6a8820c8fa91e4d96c1bb640913bd856343.tar.gz
focaccia-qemu-ecd6f6a8820c8fa91e4d96c1bb640913bd856343.zip
gdbstub: Infer number of core registers from XML
GDBFeature has the num_regs member so use it where applicable to
remove magic numbers.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20231213-gdb-v17-8-777047380591@daynix.com>
[AJB: remove core reg check from microblaze read reg]
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20240227144335.1196131-13-alex.bennee@linaro.org>
Diffstat (limited to 'target/microblaze/gdbstub.c')
-rw-r--r--target/microblaze/gdbstub.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/target/microblaze/gdbstub.c b/target/microblaze/gdbstub.c
index 6ffc5ad075..eb168d1007 100644
--- a/target/microblaze/gdbstub.c
+++ b/target/microblaze/gdbstub.c
@@ -49,14 +49,9 @@ enum {
 int mb_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
 {
     MicroBlazeCPU *cpu = MICROBLAZE_CPU(cs);
-    CPUClass *cc = CPU_GET_CLASS(cs);
     CPUMBState *env = &cpu->env;
     uint32_t val;
 
-    if (n > cc->gdb_num_core_regs) {
-        return 0;
-    }
-
     switch (n) {
     case 1 ... 31:
         val = env->regs[n];