target/sparc: Expand gdb_get_regl() in gdb_get_rega()
Convert the gdb_get_rega() macro to an inlined function, expanding gdb_get_regl() via a TARGET_SPARC64 definition check. Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20260219191955.83815-37-philmd@linaro.org>
Philippe Mathieu-Daudé committed
Feb 17, 2026 at 17:09 UTC
2420b3fdfb07e595c3ddd7396a95c4221c6cf431
1 file changed
+6
-3
target/sparc/gdbstub.c
+6
-3
@@ -22,11 +22,14 @@
22
#include "cpu.h"
23
#include "gdbstub/helpers.h"
24
25
-#ifdef TARGET_ABI32
26
-#define gdb_get_rega(buf, val) gdb_get_reg32(buf, val)
25
+static inline int gdb_get_rega(GByteArray *buf, uint64_t val)
26
+{
27
+#if defined(TARGET_ABI32) || !defined(TARGET_SPARC64)
28
+ return gdb_get_reg32(buf, val);
29
#else
28
-#define gdb_get_rega(buf, val) gdb_get_regl(buf, val)
30
+ return gdb_get_reg64(buf, val);
31
#endif
32
+}
33
34
int sparc_cpu_gdb_read_register(CPUState *cs, GByteArray *mem_buf, int n)
35
{