From 2927bd5aa3a1e7e9c802e61903c075559875e185 Mon Sep 17 00:00:00 2001 From: TuxSH Date: Sun, 28 Apr 2019 02:14:31 +0200 Subject: [PATCH] gdb: double packet size --- sysmodules/rosalina/include/gdb.h | 6 +++--- sysmodules/rosalina/source/menus/debugger.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sysmodules/rosalina/include/gdb.h b/sysmodules/rosalina/include/gdb.h index 2c36288..f4ec2bc 100644 --- a/sysmodules/rosalina/include/gdb.h +++ b/sysmodules/rosalina/include/gdb.h @@ -39,12 +39,12 @@ #define MAX_DEBUG_THREAD 127 #define MAX_BREAKPOINT 256 -#define MAX_TIO_OPEN_FILE 64 +#define MAX_TIO_OPEN_FILE 32 // 512+24 is the ideal size as IDA will try to read exactly 0x100 bytes at a time. Add 4 to this, for $#, see below. // IDA seems to want additional bytes as well. // 1024 is fine enough to put all regs in the 'T' stop reply packets -#define GDB_BUF_LEN 1024 +#define GDB_BUF_LEN 2048 #define GDB_HANDLER(name) GDB_Handle##name #define GDB_QUERY_HANDLER(name) GDB_HANDLER(Query##name) @@ -171,7 +171,7 @@ typedef struct GDBContext u32 threadListDataPos; char memoryOsInfoXmlData[0x800]; - char processesOsInfoXmlData[0x2000]; + char processesOsInfoXmlData[0x1800]; } GDBContext; typedef int (*GDBCommandHandler)(GDBContext *ctx); diff --git a/sysmodules/rosalina/source/menus/debugger.c b/sysmodules/rosalina/source/menus/debugger.c index 1759b96..94f6752 100644 --- a/sysmodules/rosalina/source/menus/debugger.c +++ b/sysmodules/rosalina/source/menus/debugger.c @@ -48,8 +48,8 @@ Menu debuggerMenu = { static MyThread debuggerSocketThread; static MyThread debuggerDebugThread; -static u8 ALIGN(8) debuggerSocketThreadStack[0x4000]; -static u8 ALIGN(8) debuggerDebugThreadStack[0x2000]; +static u8 ALIGN(8) debuggerSocketThreadStack[0x5000]; +static u8 ALIGN(8) debuggerDebugThreadStack[0x3000]; GDBServer gdbServer = { 0 }; @@ -58,14 +58,14 @@ GDBContext *nextApplicationGdbCtx = NULL; void debuggerSocketThreadMain(void); MyThread *debuggerCreateSocketThread(void) { - MyThread_Create(&debuggerSocketThread, debuggerSocketThreadMain, debuggerSocketThreadStack, 0x4000, 0x20, CORE_SYSTEM); + MyThread_Create(&debuggerSocketThread, debuggerSocketThreadMain, debuggerSocketThreadStack, 0x5000, 0x20, CORE_SYSTEM); return &debuggerSocketThread; } void debuggerDebugThreadMain(void); MyThread *debuggerCreateDebugThread(void) { - MyThread_Create(&debuggerDebugThread, debuggerDebugThreadMain, debuggerDebugThreadStack, 0x2000, 0x20, CORE_SYSTEM); + MyThread_Create(&debuggerDebugThread, debuggerDebugThreadMain, debuggerDebugThreadStack, 0x3000, 0x20, CORE_SYSTEM); return &debuggerDebugThread; }