Start GDB work (broken rn)

This commit is contained in:
CrashOveride95 committed 2021-04-16 20:50:06 -04:00
1 parent cf77e2db67
commit 4068afb39f
7 files changed
+67 -43

No files matched your search

+12
View File
@@ -18,6 +18,9 @@
#include "usb/usb.h"
#include "usb/debug.h"
#endif
#ifdef GDB
#include "gdb/debugger.h"
#endif
// Message IDs
#define MESG_SP_COMPLETE 100
@@ -312,6 +315,10 @@ void handle_dp_complete(void) {
extern void crash_screen_init(void);
void thread3_main(UNUSED void *arg) {
#ifdef GDB
OSPiHandle *gdbpihandle;
gdbpihandle = osCartRomInit();
#endif
setup_mesg_queues();
alloc_pool();
load_engine_code_segment();
@@ -331,6 +338,11 @@ void thread3_main(UNUSED void *arg) {
create_thread(&gGameLoopThread, 5, thread5_game_loop, NULL, gThread5Stack + 0x2000, 10);
osStartThread(&gGameLoopThread);
#ifdef GDB
OSThread* threadPtr = &gMainThread;
gdbInitDebugger(gdbpihandle, &gDmaMesgQueue, &threadPtr, 1);
#endif
while (TRUE) {
OSMesg msg;