summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-09-06 15:21:47 +0000
committerdim <dim@FreeBSD.org>2015-09-06 15:21:47 +0000
commiteaea1142467bd061be671b7775195ea69422a53f (patch)
tree6dbe733cbb748d293bbaa2b7616e76faff7118d5 /contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
parentee8d011a70fa14b1e123f58d0139125f5e36173e (diff)
parent80b639cd40df427b9e325318efeec2d885a65f62 (diff)
downloadFreeBSD-src-eaea1142467bd061be671b7775195ea69422a53f.zip
FreeBSD-src-eaea1142467bd061be671b7775195ea69422a53f.tar.gz
Update lldb to upstream trunk r242221.
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
index 1af3947..9c263c8 100644
--- a/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ b/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -564,8 +564,12 @@ GDBRemoteCommunication::DecompressPacket ()
return true;
size_t pkt_size = m_bytes.size();
- if (pkt_size < 6)
+
+ // Smallest possible compressed packet is $N#00 - an uncompressed empty reply, most commonly indicating
+ // an unsupported packet. Anything less than 5 characters, it's definitely not a compressed packet.
+ if (pkt_size < 5)
return true;
+
if (m_bytes[0] != '$' && m_bytes[0] != '%')
return true;
if (m_bytes[1] != 'C' && m_bytes[1] != 'N')
OpenPOWER on IntegriCloud