Browse Source

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>
master
Philippe Mathieu-Daudé 6 months ago
parent
commit
2420b3fdfb
  1. 9
      target/sparc/gdbstub.c

9
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)
{

Loading…
Cancel
Save