diff options
author | Steve Pucci <spucci@google.com> | 2014-02-24 19:07:29 +0000 |
---|---|---|
committer | Steve Pucci <spucci@google.com> | 2014-02-24 19:07:29 +0000 |
commit | 3c5d3339be0eb6a6b6b58033b24d613c46c4d4d3 (patch) | |
tree | ebc52734bfb3353d3bcb9f0dfcabb8f82122ea77 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | |
parent | 039697513e85d07bfcac783a3e3310ddd1769271 (diff) | |
download | bcm5719-llvm-3c5d3339be0eb6a6b6b58033b24d613c46c4d4d3.tar.gz bcm5719-llvm-3c5d3339be0eb6a6b6b58033b24d613c46c4d4d3.zip |
Fix handling of gdbserver binary packets with escape characters.
We were not properly handling the escape character 0x7d ('}') in responses
from gdbserver which used the binary protocol.
llvm-svn: 202062
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 1ec75a4bc7a..72600d83593 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -497,6 +497,13 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri for (int i = 0; i < repeat_count; ++i) packet_str.push_back(char_to_repeat); } + else if (*c == 0x7d) + { + // 0x7d is the escape character. The next character is to + // be XOR'd with 0x20. + char escapee = *++c ^ 0x20; + packet_str.push_back(escapee); + } else { packet_str.push_back(*c); |