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>
diff --git a/target-xtensa/gdbstub.c b/target-xtensa/gdbstub.c
index 0880b7c..c963563 100644
--- a/target-xtensa/gdbstub.c
+++ b/target-xtensa/gdbstub.c
@@ -28,23 +28,25 @@
 
     switch (reg->type) {
     case 9: /*pc*/
-        GET_REG32(env->pc);
+        return gdb_get_reg32(mem_buf, env->pc);
 
     case 1: /*ar*/
         xtensa_sync_phys_from_window(env);
-        GET_REG32(env->phys_regs[(reg->targno & 0xff) % env->config->nareg]);
+        return gdb_get_reg32(mem_buf, env->phys_regs[(reg->targno & 0xff)
+                                                     % env->config->nareg]);
 
     case 2: /*SR*/
-        GET_REG32(env->sregs[reg->targno & 0xff]);
+        return gdb_get_reg32(mem_buf, env->sregs[reg->targno & 0xff]);
 
     case 3: /*UR*/
-        GET_REG32(env->uregs[reg->targno & 0xff]);
+        return gdb_get_reg32(mem_buf, env->uregs[reg->targno & 0xff]);
 
     case 4: /*f*/
-        GET_REG32(float32_val(env->fregs[reg->targno & 0x0f]));
+        return gdb_get_reg32(mem_buf, float32_val(env->fregs[reg->targno
+                                                             & 0x0f]));
 
     case 8: /*a*/
-        GET_REG32(env->regs[reg->targno & 0x0f]);
+        return gdb_get_reg32(mem_buf, env->regs[reg->targno & 0x0f]);
 
     default:
         qemu_log("%s from reg %d of unsupported type %d\n",