diff options
author | Jason Molenda <jmolenda@apple.com> | 2023-08-15 13:19:07 -0700 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 2023-08-15 13:21:33 -0700 |
commit | 3ad618f4aea1ef7442f7ff75d92632aec177a4fd (patch) | |
tree | d98cd63991a5a484a70a3c270c215765bfb48a2d /lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | |
parent | fa6726e27bb872ada13fe44c6609e9336785dd36 (diff) | |
download | llvm-3ad618f4aea1ef7442f7ff75d92632aec177a4fd.zip llvm-3ad618f4aea1ef7442f7ff75d92632aec177a4fd.tar.gz llvm-3ad618f4aea1ef7442f7ff75d92632aec177a4fd.tar.bz2 |
Update qHostInfo/LC_NOTE so multiple address bits can be specified
On AArch64 systems, we may have different page table setups for
low memory and high memory, and therefore a different number of
bits used for addressing depending on which half of memory the
address is in.
This patch extends the qHostInfo and LC_NOTE "addrable bits" so
that it can specify the number of addressing bits in high memory
and in low memory separately. It builds on the patch I added in
https://reviews.llvm.org/D151292 where Process tracks the separate
address masks, and there is a user setting to set them manually.
Differential Revision: https://reviews.llvm.org/D157667
rdar://113225907
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp index 336f060..2c35957 100644 --- a/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp @@ -899,10 +899,9 @@ void ProcessGDBRemote::DidLaunchOrAttach(ArchSpec &process_arch) { process_arch.GetTriple().getTriple()); } - if (int addressable_bits = m_gdb_comm.GetAddressingBits()) { - lldb::addr_t address_mask = ~((1ULL << addressable_bits) - 1); - SetCodeAddressMask(address_mask); - SetDataAddressMask(address_mask); + AddressableBits addressable_bits; + if (m_gdb_comm.GetAddressableBits(addressable_bits)) { + addressable_bits.SetProcessMasks(*this); } if (process_arch.IsValid()) { |