diff options
author | Jason Molenda <jmolenda@apple.com> | 2023-08-16 16:10:30 -0700 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2023-08-16 16:12:18 -0700 |
commit | 6f4a0c762fe2c0077865e0e30e3dfd67cd6287d1 (patch) | |
tree | 11bd09a1043b97512e868073e7bf275fb42b5a2a /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | |
parent | 6664e80ace0845d34eecebe0d5da0b576cde39ef (diff) | |
download | llvm-6f4a0c762fe2c0077865e0e30e3dfd67cd6287d1.zip llvm-6f4a0c762fe2c0077865e0e30e3dfd67cd6287d1.tar.gz llvm-6f4a0c762fe2c0077865e0e30e3dfd67cd6287d1.tar.bz2 |
hi/low addr space bits can be sent in stop-rely packet
Add support for the `low_mem_addressing_bits` and
`high_mem_addressing_bits` keys in the stop reply packet,
in addition to the existing `addressing_bits`. Same
behavior as in the qHostInfo packet.
Clean up AddressableBits so we don't need to check if
any values have been set in the object before using it
to potentially update the Process address masks.
Differential Revision: https://reviews.llvm.org/D158041
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp index f836f08..1fcd850 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp @@ -1415,17 +1415,17 @@ GDBRemoteCommunicationClient::GetHostArchitecture() { return m_host_arch; } -bool GDBRemoteCommunicationClient::GetAddressableBits( - lldb_private::AddressableBits &addressable_bits) { - addressable_bits.Clear(); +AddressableBits GDBRemoteCommunicationClient::GetAddressableBits() { + AddressableBits addressable_bits; if (m_qHostInfo_is_valid == eLazyBoolCalculate) GetHostInfo(); - if (m_low_mem_addressing_bits != 0 || m_high_mem_addressing_bits != 0) { - addressable_bits.SetAddressableBits(m_low_mem_addressing_bits, - m_high_mem_addressing_bits); - return true; - } - return false; + + // m_low_mem_addressing_bits and m_high_mem_addressing_bits + // will be 0 if we did not receive values; AddressableBits + // treats 0 as "unspecified". + addressable_bits.SetAddressableBits(m_low_mem_addressing_bits, + m_high_mem_addressing_bits); + return addressable_bits; } seconds GDBRemoteCommunicationClient::GetHostDefaultPacketTimeout() { |