diff options
author | Andreas Färber <afaerber@suse.de> | 2013-07-07 13:05:05 +0200 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2013-07-27 00:04:17 +0200 |
commit | 986a2998932e978e63fc3b7ead1fef81f7aad52e (patch) | |
tree | 93d84a9f6c46c1bd4a9d98d9c9463ed276ca4260 /target-cris/gdbstub.c | |
parent | 25d8ac0e31c3c68dfdd6da7c33b87870b4a3b623 (diff) |
gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions
This avoids polluting the global namespace with a non-prefixed macro and
makes it obvious in the call sites that we return.
Semi-automatic conversion using, e.g.,
sed -i 's/GET_REGL(/return gdb_get_regl(mem_buf, /g' target-*/gdbstub.c
followed by manual tweaking for sparc's GET_REGA() and Coding Style.
Acked-by: Michael Walle <michael@walle.cc> (for lm32)
Acked-by: Max Filippov <jcmvbkbc@gmail.com> (for xtensa)
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'target-cris/gdbstub.c')
-rw-r--r-- | target-cris/gdbstub.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/target-cris/gdbstub.c b/target-cris/gdbstub.c index b48224a14f..ed23966c91 100644 --- a/target-cris/gdbstub.c +++ b/target-cris/gdbstub.c @@ -22,25 +22,25 @@ static int read_register_crisv10(CPUCRISState *env, uint8_t *mem_buf, int n) { if (n < 15) { - GET_REG32(env->regs[n]); + return gdb_get_reg32(mem_buf, env->regs[n]); } if (n == 15) { - GET_REG32(env->pc); + return gdb_get_reg32(mem_buf, env->pc); } if (n < 32) { switch (n) { case 16: - GET_REG8(env->pregs[n - 16]); + return gdb_get_reg8(mem_buf, env->pregs[n - 16]); case 17: - GET_REG8(env->pregs[n - 16]); + return gdb_get_reg8(mem_buf, env->pregs[n - 16]); case 20: case 21: - GET_REG16(env->pregs[n - 16]); + return gdb_get_reg16(mem_buf, env->pregs[n - 16]); default: if (n >= 23) { - GET_REG32(env->pregs[n - 16]); + return gdb_get_reg32(mem_buf, env->pregs[n - 16]); } break; } @@ -58,28 +58,28 @@ static int cpu_gdb_read_register(CPUCRISState *env, uint8_t *mem_buf, int n) srs = env->pregs[PR_SRS]; if (n < 16) { - GET_REG32(env->regs[n]); + return gdb_get_reg32(mem_buf, env->regs[n]); } if (n >= 21 && n < 32) { - GET_REG32(env->pregs[n - 16]); + return gdb_get_reg32(mem_buf, env->pregs[n - 16]); } if (n >= 33 && n < 49) { - GET_REG32(env->sregs[srs][n - 33]); + return gdb_get_reg32(mem_buf, env->sregs[srs][n - 33]); } switch (n) { case 16: - GET_REG8(env->pregs[0]); + return gdb_get_reg8(mem_buf, env->pregs[0]); case 17: - GET_REG8(env->pregs[1]); + return gdb_get_reg8(mem_buf, env->pregs[1]); case 18: - GET_REG32(env->pregs[2]); + return gdb_get_reg32(mem_buf, env->pregs[2]); case 19: - GET_REG8(srs); + return gdb_get_reg8(mem_buf, srs); case 20: - GET_REG16(env->pregs[4]); + return gdb_get_reg16(mem_buf, env->pregs[4]); case 32: - GET_REG32(env->pc); + return gdb_get_reg32(mem_buf, env->pc); } return 0; |