Decoupling Architectural-specific Code (#35)
[lunaix-os.git] / lunaix-os / arch / generic / includes / sys / gdbstub.h
diff --git a/lunaix-os/arch/generic/includes/sys/gdbstub.h b/lunaix-os/arch/generic/includes/sys/gdbstub.h
new file mode 100644 (file)
index 0000000..70f0df9
--- /dev/null
@@ -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