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 59a9b87d5..2c0da48f0 100644 --- a/src/base/remote_gdb.cc +++ b/src/base/remote_gdb.cc @@ -610,7 +610,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; @@ -619,6 +619,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()); @@ -916,6 +918,7 @@ BaseRemoteGDB::trap(int type) } out: + free(buffer); return true; } |