diff options
Diffstat (limited to 'src/base/remote_gdb.cc')
-rw-r--r-- | src/base/remote_gdb.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/base/remote_gdb.cc b/src/base/remote_gdb.cc index b1f50755b..988b50c65 100644 --- a/src/base/remote_gdb.cc +++ b/src/base/remote_gdb.cc @@ -631,7 +631,7 @@ BaseRemoteGDB::trap(int type) uint64_t val; size_t datalen, len; char data[GDBPacketBufLen + 1]; - char buffer[gdbregs.bytes() * 2 + 256]; + char *buffer; const char *p; char command, subcmd; string var; @@ -640,6 +640,8 @@ BaseRemoteGDB::trap(int type) if (!attached) return false; + buffer = (char*)malloc(gdbregs.bytes() * 2 + 256); + DPRINTF(GDBMisc, "trap: PC=%#x NPC=%#x\n", context->readPC(), context->readNextPC()); @@ -937,6 +939,7 @@ BaseRemoteGDB::trap(int type) } out: + free(buffer); return true; } |