[lldb] Add FixAnyAddress to ABI plugins
FixAnyAddress is to be used when we don't know or don't care whether we're fixing a code or data address. By using FixAnyAddress over the others, you document that no specific choice was made. On all existing platforms apart from Arm Thumb, you could use either FixCodeAddress or FixDataAddress and be fine. Up until now I've chosen to use FixDataAddress but if I had chosen to use FixCodeAddress that would have broken Arm Thumb. Hence FixAnyAddress, to give you the "safest" option when you're in generic code. Uses of FixDataAddress in memory region code have been changed to FixAnyAddress. The functionality is unchanged. Reviewed By: omjavaid, JDevlieghere Differential Revision: https://reviews.llvm.org/D124000
This commit is contained in:
@@ -5831,7 +5831,7 @@ Process::AdvanceAddressToNextBranchInstruction(Address default_stop_addr,
|
||||
Status Process::GetMemoryRegionInfo(lldb::addr_t load_addr,
|
||||
MemoryRegionInfo &range_info) {
|
||||
if (const lldb::ABISP &abi = GetABI())
|
||||
load_addr = abi->FixDataAddress(load_addr);
|
||||
load_addr = abi->FixAnyAddress(load_addr);
|
||||
return DoGetMemoryRegionInfo(load_addr, range_info);
|
||||
}
|
||||
|
||||
@@ -5866,7 +5866,7 @@ Status Process::GetMemoryRegions(lldb_private::MemoryRegionInfos ®ion_list) {
|
||||
range_end != LLDB_INVALID_ADDRESS &&
|
||||
// If we have non-address bits and some are set then the end
|
||||
// is at or beyond the end of mappable memory.
|
||||
!(abi && (abi->FixDataAddress(range_end) != range_end)));
|
||||
!(abi && (abi->FixAnyAddress(range_end) != range_end)));
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user