forked from OSchip/llvm-project
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
This commit is contained in:
parent
856e4767ff
commit
0ace3f5c73
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue