Convert the gdb_get_rega() macro to an inlined function, expanding gdb_get_regl() via a TARGET_SPARC64 definition check.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- target/sparc/gdbstub.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/target/sparc/gdbstub.c b/target/sparc/gdbstub.c index d19819cd1a9..792bf70a145 100644 --- a/target/sparc/gdbstub.c +++ b/target/sparc/gdbstub.c @@ -22,11 +22,14 @@ #include "cpu.h" #include "gdbstub/helpers.h" -#ifdef TARGET_ABI32 -#define gdb_get_rega(buf, val) gdb_get_reg32(buf, val) +static inline int gdb_get_rega(GByteArray *buf, uint64_t val) +{ +#if defined(TARGET_ABI32) || !defined(TARGET_SPARC64) + return gdb_get_reg32(buf, val); #else -#define gdb_get_rega(buf, val) gdb_get_regl(buf, val) + return gdb_get_reg64(buf, val); #endif +} int sparc_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n) { -- 2.52.0
