diff options
author | Jason Molenda <jmolenda@apple.com> | 2015-09-09 03:24:52 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2015-09-09 03:24:52 +0000 |
commit | 0ace3f5c73b07c9bd54e5ecd215bef5113daf25f (patch) | |
tree | b1490b9ddcbe436138e5bd8f389b0bf5f048570d /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | |
parent | 856e4767ffde5eab25d1dbef45cde833eb14456e (diff) | |
download | bcm5719-llvm-0ace3f5c73b07c9bd54e5ecd215bef5113daf25f.tar.gz bcm5719-llvm-0ace3f5c73b07c9bd54e5ecd215bef5113daf25f.zip |
A change I'm open to reverting if there is disagreement:
When lldb receives a gdb-remote protocol packet that has
nonprintable characters, it will print the packet in
gdb-remote logging with binary-hex encoding so we don't
dump random 8-bit characters into the packet log.
I'm changing this check to allow whitespace characters
(newlines, linefeeds, tabs) to be printed if those are
the only non-printable characters in the packet.
This is primarily to get the response to the
qXfer:features:read:target.xml packet to show up in the
packet logs in human readable form. Right now we just
get a dozen kilobytes of hex-ascii and it's hard to
figure out what register number scheme is being used.
llvm-svn: 247120
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index 716e7edf7a4..89cdf61ab39 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -936,8 +936,10 @@ GDBRemoteCommunication::CheckForPacket (const uint8_t *src, size_t src_len, Stri { for (size_t i=0; !binary && i<total_length; ++i) { - if (isprint(m_bytes[i]) == 0) + if (isprint (m_bytes[i]) == 0 && isspace (m_bytes[i]) == 0) + { binary = true; + } } } if (binary) |