diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:49:40 -0500 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2007-01-26 18:49:40 -0500 |
commit | fd8a4ff5a8a9ea65e227f0b4000dfcda06d4764f (patch) | |
tree | ce2a5d4e12142eab64231daab73953a15384b7c6 /src/base/remote_gdb.cc | |
parent | 8561c8366c7c9afd7e6b52b6e2385b3c1dde95a9 (diff) | |
parent | 63fdabf191b8ac1031fb25da61ab2526d4bb6d05 (diff) | |
download | gem5-fd8a4ff5a8a9ea65e227f0b4000dfcda06d4764f.tar.xz |
Merge zeep.pool:/z/saidi/work/m5.newmem
into zeep.pool:/z/saidi/work/m5.suncc
--HG--
extra : convert_revision : 20f61a524a3b53fc0afcf53a24b5a1fe1d96f579
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; } |