Decoupling Architectural-specific Code (#35)
[lunaix-os.git] / lunaix-os / arch / generic / includes / sys / gdbstub.h
1 #ifndef __LUNAIX_ARCH_GDBSTUB_ARCH_H
2 #define __LUNAIX_ARCH_GDBSTUB_ARCH_H
3
4 #include "sys/hart.h"
5
6 enum GDB_REGISTER
7 {
8     // TODO add your registers
9     GDB_CPU_NUM_REGISTERS
10 };
11
12 struct gdb_state;
13
14 void
15 arch_gdbstub_setup_state(struct gdb_state* state, struct hart_state* hstate);
16
17 void
18 arch_gdbstub_save_regs(struct gdb_state* state, struct hart_state* hstate);
19
20 void
21 arch_gdbstub_restore_regs(struct gdb_state* state, struct hart_state* hstate);
22
23 int
24 gdb_sys_continue(struct gdb_state* state);
25
26 int
27 gdb_sys_step(struct gdb_state* state);
28
29 #endif /* __LUNAIX_ARCH_GDBSTUB_ARCH_H */