[Lldb-commits] [lldb] r247120 - A change I'm open to reverting if there is disagreement:
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Tue Sep 8 20:24:52 PDT 2015
Author: jmolenda
Date: Tue Sep 8 22:24:52 2015
New Revision: 247120
URL: http://llvm.org/viewvc/llvm-project?rev=247120&view=rev
Log:
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.
Modified:
lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp?rev=247120&r1=247119&r2=247120&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp Tue Sep 8 22:24:52 2015
@@ -936,8 +936,10 @@ GDBRemoteCommunication::CheckForPacket (
{
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)
More information about the lldb-commits
mailing list