mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
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>
This commit is contained in:
parent
25d8ac0e31
commit
986a299893
16 changed files with 177 additions and 164 deletions
|
@ -22,24 +22,24 @@
|
|||
static int cpu_gdb_read_register(CPULM32State *env, uint8_t *mem_buf, int n)
|
||||
{
|
||||
if (n < 32) {
|
||||
GET_REG32(env->regs[n]);
|
||||
return gdb_get_reg32(mem_buf, env->regs[n]);
|
||||
} else {
|
||||
switch (n) {
|
||||
case 32:
|
||||
GET_REG32(env->pc);
|
||||
return gdb_get_reg32(mem_buf, env->pc);
|
||||
/* FIXME: put in right exception ID */
|
||||
case 33:
|
||||
GET_REG32(0);
|
||||
return gdb_get_reg32(mem_buf, 0);
|
||||
case 34:
|
||||
GET_REG32(env->eba);
|
||||
return gdb_get_reg32(mem_buf, env->eba);
|
||||
case 35:
|
||||
GET_REG32(env->deba);
|
||||
return gdb_get_reg32(mem_buf, env->deba);
|
||||
case 36:
|
||||
GET_REG32(env->ie);
|
||||
return gdb_get_reg32(mem_buf, env->ie);
|
||||
case 37:
|
||||
GET_REG32(lm32_pic_get_im(env->pic_state));
|
||||
return gdb_get_reg32(mem_buf, lm32_pic_get_im(env->pic_state));
|
||||
case 38:
|
||||
GET_REG32(lm32_pic_get_ip(env->pic_state));
|
||||
return gdb_get_reg32(mem_buf, lm32_pic_get_ip(env->pic_state));
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue