From 1541e6e0b060637cff5ff882fa24956f88dc3a35 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sat, 1 Feb 2014 05:44:40 -0800 Subject: [PATCH] Expand packet size for lldb compat --- src/debugger/gdb-stub.c | 5 ++--- src/debugger/gdb-stub.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/debugger/gdb-stub.c b/src/debugger/gdb-stub.c index 3406336f2..3f6ecac45 100644 --- a/src/debugger/gdb-stub.c +++ b/src/debugger/gdb-stub.c @@ -125,14 +125,13 @@ static void _readMemory(struct GDBStub* stub, const char* message) { } uint32_t address = _hex2int(readAddress, i); readAddress += i + 1; - // TODO: expand this capacity - for (i = 0; i < 1; ++i) { + for (i = 0; i < 8; ++i) { if (readAddress[i] == '#') { break; } } uint32_t size = _hex2int(readAddress, i); - if (size > 4) { + if (size > 512) { _error(stub, GDB_BAD_ARGUMENTS); return; } diff --git a/src/debugger/gdb-stub.h b/src/debugger/gdb-stub.h index d5a0b7fe9..5be0fd0ad 100644 --- a/src/debugger/gdb-stub.h +++ b/src/debugger/gdb-stub.h @@ -3,7 +3,7 @@ #include "debugger.h" -#define GDB_STUB_MAX_LINE 256 +#define GDB_STUB_MAX_LINE 1200 enum GDBStubAckState { GDB_ACK_PENDING = 0,