diff options
author | Hafiz Abid Qadeer <hafiz_abid@mentor.com> | 2013-08-28 15:10:37 +0000 |
---|---|---|
committer | Hafiz Abid Qadeer <hafiz_abid@mentor.com> | 2013-08-28 15:10:37 +0000 |
commit | e5fd5e109262376df1f2ca5cb3816a39b9866443 (patch) | |
tree | bd1d72c354d3e61c9cc77b0f071d821d22a814e5 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | |
parent | f5769880d982dfbb416d1b5014108f259545c27e (diff) | |
download | bcm5719-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.cpp | 2 |
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) |