target-moxie: Add gdbstub support
PATCH 1/1 target-moxie: Add gdbstub support
This patch adds gdbstub support for the moxie target port.
Signed-off-by Anthony Green <[email protected]>
--- target-moxie/Makefile.objs | 1 + target-moxie/cpu.c | 3 +++ target-moxie/cpu.h | 2 ++ target-moxie/gdbstub.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 62 insertions(+) create mode 100644 target-moxie/gdbstub.c
target-moxie/Makefile.objs +1 -0
@@ -1,2 +1,3 @@ obj-y += translate.o helper.o machine.o cpu.o machine.o +obj-y += gdbstub.o obj-$(CONFIG_SOFTMMU) += mmu.o
target-moxie/cpu.c +3 -0
@@ -102,10 +102,13 @@ static void moxie_cpu_class_init(ObjectClass *oc, void *data) cc->do_interrupt = moxie_cpu_do_interrupt; cc->dump_state = moxie_cpu_dump_state; cc->set_pc = moxie_cpu_set_pc; + cc->gdb_read_register = moxie_cpu_gdb_read_register; + cc->gdb_write_register = moxie_cpu_gdb_write_register;#ifndef CONFIG_USER_ONLY cc->get_phys_page_debug = moxie_cpu_get_phys_page_debug; cc->vmsd = &vmstate_moxie_cpu;#endif + cc->gdb_num_core_regs =16 +1 ; }static void moxielite_initfn (Object *obj)
target-moxie/cpu.h +2 -0
@@ -119,6 +119,8 @@ void moxie_cpu_do_interrupt(CPUState *cs);void moxie_cpu_dump_state (CPUState *cpu,FILE *f,fprintf_function cpu_fprintf,int flags);hwaddr moxie_cpu_get_phys_page_debug (CPUState *cpu,vaddr addr); +int moxie_cpu_gdb_read_register (CPUState *cpu,uint8_t *buf,int reg); +int moxie_cpu_gdb_write_register (CPUState *cpu,uint8_t *buf,int reg);void moxie_translate_init (void );int cpu_moxie_signal_handler (int host_signum,void *pinfo,void *puc);
target-moxie/gdbstub.c new file +56 -0
56 lines not on this page · raw message
Signature · 1 line
1.8.3.1