X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/6c506d8916fb114675e93d0e2cb20831d4022294..d1b1c8d9119229dbeed06cd252917e54a1cb77f6:/lunaix-os/arch/generic/includes/sys/gdbstub.h?ds=sidebyside diff --git a/lunaix-os/arch/generic/includes/sys/gdbstub.h b/lunaix-os/arch/generic/includes/sys/gdbstub.h new file mode 100644 index 0000000..70f0df9 --- /dev/null +++ b/lunaix-os/arch/generic/includes/sys/gdbstub.h @@ -0,0 +1,29 @@ +#ifndef __LUNAIX_ARCH_GDBSTUB_ARCH_H +#define __LUNAIX_ARCH_GDBSTUB_ARCH_H + +#include "sys/hart.h" + +enum GDB_REGISTER +{ + // TODO add your registers + GDB_CPU_NUM_REGISTERS +}; + +struct gdb_state; + +void +arch_gdbstub_setup_state(struct gdb_state* state, struct hart_state* hstate); + +void +arch_gdbstub_save_regs(struct gdb_state* state, struct hart_state* hstate); + +void +arch_gdbstub_restore_regs(struct gdb_state* state, struct hart_state* hstate); + +int +gdb_sys_continue(struct gdb_state* state); + +int +gdb_sys_step(struct gdb_state* state); + +#endif /* __LUNAIX_ARCH_GDBSTUB_ARCH_H */ \ No newline at end of file