Skip to content
Browse files

Add support for new LM32 CSR registers in Qemu GDB stub

  • Loading branch information...
1 parent 4d4fa05 commit b63023a653adc1de374563759dda37cdcdc3d713 @fallen committed Sep 28, 2013
Showing with 9 additions and 1 deletion.
  1. +1 −1 target-lm32/cpu.c
  2. +8 −0 target-lm32/gdbstub.c
View
2 target-lm32/cpu.c
@@ -96,7 +96,7 @@ static void lm32_cpu_class_init(ObjectClass *oc, void *data)
cc->get_phys_page_debug = lm32_cpu_get_phys_page_debug;
cc->vmsd = &vmstate_lm32_cpu;
#endif
- cc->gdb_num_core_regs = 32 + 7;
+ cc->gdb_num_core_regs = 32 + 11;
}
static const TypeInfo lm32_cpu_type_info = {
View
8 target-lm32/gdbstub.c
@@ -46,6 +46,14 @@ int lm32_cpu_gdb_read_register(CPUState *cs, uint8_t *mem_buf, int n)
return gdb_get_reg32(mem_buf, lm32_pic_get_im(env->pic_state));
case 38:
return gdb_get_reg32(mem_buf, lm32_pic_get_ip(env->pic_state));
+ case 39:
+ return gdb_get_reg32(mem_buf, env->psw);
+ case 40:
+ return gdb_get_reg32(mem_buf, env->tlbvaddr);
+ case 41:
+ return gdb_get_reg32(mem_buf, 0xdeadbeef);
+ case 42:
+ return gdb_get_reg32(mem_buf, env->tlbbadvaddr);
}
}
return 0;

0 comments on commit b63023a

Please sign in to comment.
Something went wrong with that request. Please try again.