From 986a2998932e978e63fc3b7ead1fef81f7aad52e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Sun, 7 Jul 2013 13:05:05 +0200 Subject: gdbstub: Replace GET_REG*() macros with gdb_get_reg*() functions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 (for lm32) Acked-by: Max Filippov (for xtensa) Signed-off-by: Andreas Färber --- target-s390x/gdbstub.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'target-s390x') diff --git a/target-s390x/gdbstub.c b/target-s390x/gdbstub.c index c966143a9d..ee3e984a32 100644 --- a/target-s390x/gdbstub.c +++ b/target-s390x/gdbstub.c @@ -27,17 +27,17 @@ static int cpu_gdb_read_register(CPUS390XState *env, uint8_t *mem_buf, int n) case S390_PSWM_REGNUM: cc_op = calc_cc(env, env->cc_op, env->cc_src, env->cc_dst, env->cc_vr); val = deposit64(env->psw.mask, 44, 2, cc_op); - GET_REGL(val); + return gdb_get_regl(mem_buf, val); case S390_PSWA_REGNUM: - GET_REGL(env->psw.addr); + return gdb_get_regl(mem_buf, env->psw.addr); case S390_R0_REGNUM ... S390_R15_REGNUM: - GET_REGL(env->regs[n-S390_R0_REGNUM]); + return gdb_get_regl(mem_buf, env->regs[n-S390_R0_REGNUM]); case S390_A0_REGNUM ... S390_A15_REGNUM: - GET_REG32(env->aregs[n-S390_A0_REGNUM]); + return gdb_get_reg32(mem_buf, env->aregs[n-S390_A0_REGNUM]); case S390_FPC_REGNUM: - GET_REG32(env->fpc); + return gdb_get_reg32(mem_buf, env->fpc); case S390_F0_REGNUM ... S390_F15_REGNUM: - GET_REG64(env->fregs[n-S390_F0_REGNUM].ll); + return gdb_get_reg64(mem_buf, env->fregs[n-S390_F0_REGNUM].ll); } return 0; -- cgit v1.2.3