summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index e54fec5817f..5e0a2fff16c 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -465,6 +465,8 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri
m_history.AddPacket (m_bytes.c_str(), total_length, History::ePacketTypeRecv, total_length);
+ // Clear packet_str in case there is some existing data in it.
+ packet_str.clear();
// Copy the packet from m_bytes to packet_str expanding the
// run-length encoding in the process.
// Reserve enough byte for the most common case (no RLE used)
OpenPOWER on IntegriCloud