aboutsummaryrefslogtreecommitdiff
path: root/target-cris/gdbstub.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-07-07 14:39:41 +0200
committerAndreas Färber <afaerber@suse.de>2013-07-27 00:04:17 +0200
commit90431220be42d773084d88635961a45febb01c5d (patch)
treede54385dcc9502b3b0ca9483bfe41d61ccd38a95 /target-cris/gdbstub.c
parent5b50e790f9e9403d11b4164193b76530ee85a2a1 (diff)
downloadqemu-arm-90431220be42d773084d88635961a45febb01c5d.tar.gz
target-cris: Factor out CPUClass::gdb_read_register() hook for v10
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-cris/gdbstub.c')
-rw-r--r--target-cris/gdbstub.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/target-cris/gdbstub.c b/target-cris/gdbstub.c
index 958a370e06..5db3683ab6 100644
--- a/target-cris/gdbstub.c
+++ b/target-cris/gdbstub.c
@@ -21,9 +21,11 @@
#include "qemu-common.h"
#include "exec/gdbstub.h"
-static int
-read_register_crisv10(CPUCRISState *env, uint8_t *mem_buf, int n)
+int crisv10_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
{
+ CRISCPU *cpu = CRIS_CPU(cs);
+ CPUCRISState *env = &cpu->env;
+
if (n < 15) {
return gdb_get_reg32(mem_buf, env->regs[n]);
}
@@ -57,10 +59,6 @@ int cris_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
CPUCRISState *env = &cpu->env;
uint8_t srs;
- if (env->pregs[PR_VR] < 32) {
- return read_register_crisv10(env, mem_buf, n);
- }
-
srs = env->pregs[PR_SRS];
if (n < 16) {
return gdb_get_reg32(mem_buf, env->regs[n]);