summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
diff options
context:
space:
mode:
authorHafiz Abid Qadeer <hafiz_abid@mentor.com>2013-08-28 15:10:37 +0000
committerHafiz Abid Qadeer <hafiz_abid@mentor.com>2013-08-28 15:10:37 +0000
commite5fd5e109262376df1f2ca5cb3816a39b9866443 (patch)
treebd1d72c354d3e61c9cc77b0f071d821d22a814e5 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
parentf5769880d982dfbb416d1b5014108f259545c27e (diff)
downloadbcm5719-llvm-e5fd5e109262376df1f2ca5cb3816a39b9866443.tar.gz
bcm5719-llvm-e5fd5e109262376df1f2ca5cb3816a39b9866443.zip
Clear 'packet_str' before putting new packet.
llvm-svn: 189484
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