diff options
author | Jason Molenda <jmolenda@apple.com> | 2020-01-09 16:05:38 -0800 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2020-01-09 16:05:38 -0800 |
commit | 02113918ed6b5e514afd7d1e007131d36ac13f1d (patch) | |
tree | 7d04e4cf699d21683a02ed5272a35b1ef68b1aef /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | cd69e4c74c174101817c9f6b7c02374ac6a7476f (diff) | |
download | bcm5719-llvm-02113918ed6b5e514afd7d1e007131d36ac13f1d.tar.gz bcm5719-llvm-02113918ed6b5e514afd7d1e007131d36ac13f1d.zip |
When reading Aux file in chunks, read consecutive byte ranges
qemu has a very small maximum packet size (4096) and it actually
only uses half of that buffer for some implementation reason,
so when lldb asks for the register target definitions, the x86_64
definition is larger than 4096/2 and we need to fetch it in two parts.
This patch and test is fixing a bug in
GDBRemoteCommunicationClient::ReadExtFeature when reading a target
file in multiple parts. lldb was assuming that it would always
get back the maximum packet size response (4096) instead of
using the actual size received and asking for the next group of
bytes.
We now have two tests in gdb_remote_client for unique features
of qemu - TestNestedRegDefinitions.py would test the ability
of lldb to follow multiple levels of xml includes; I opted to
create a separate TestRegDefinitionInParts.py test to test this
wrinkle in qemu's gdb remote serial protocol stub implementation.
Instead of combining both tests into a single test file.
<rdar://problem/49537922>
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index 19c3a5b4a0f..b2f1ee527e8 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -3740,7 +3740,7 @@ bool GDBRemoteCommunicationClient::ReadExtFeature( case ('m'): if (str.length() > 1) output << &str[1]; - offset += size; + offset += str.length() - 1; break; // unknown chunk |