You've already forked Microtransactions64
mirror of
https://github.com/Print-and-Panic/Microtransactions64.git
synced 2026-01-21 10:17:19 -08:00
Start GDB work (broken rn)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#define MAX_PACKET_SIZE 0x4000
|
||||
#define MAX_DEBUGGER_THREADS 8
|
||||
@@ -4,7 +4,7 @@
|
||||
u8 (*gdbSerialCanRead)();
|
||||
|
||||
#if USE_UNF_LOADER
|
||||
#include "usb.h"
|
||||
#include <usb/usb.h>
|
||||
|
||||
u32 gdbPendingUNFHeader;
|
||||
u32 gdbPendingUNFData;
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
// #define USE_UNF_LOADER 1
|
||||
//#define USE_UNF_LOADER 1
|
||||
|
||||
enum GDBError {
|
||||
GDBErrorNone,
|
||||
Reference in New Issue
Block a user