aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectMemory.cpp
diff options
context:
space:
mode:
authorDavid Spickett <david.spickett@linaro.org>2022-09-16 12:51:31 +0000
committerDavid Spickett <david.spickett@linaro.org>2022-09-23 12:32:38 +0000
commitc831cea5efaaafaa97e3faf3119da3362868f41a (patch)
treecc46e77c527be7c68092d6994de7d47e4c1e45e2 /lldb/source/Commands/CommandObjectMemory.cpp
parentee582001bf19be8611257df7c5fc5a5e7e7da586 (diff)
downloadllvm-c831cea5efaaafaa97e3faf3119da3362868f41a.zip
llvm-c831cea5efaaafaa97e3faf3119da3362868f41a.tar.gz
llvm-c831cea5efaaafaa97e3faf3119da3362868f41a.tar.bz2
[LLDB] Fix "memory region --all" when there is no ABI plugin
There are two conditions for the loop exit. Either we hit LLDB_INVALID_ADDRESS or the ABI tells us we are beyond mappable memory. I made a mistake in that second part that meant if you had no ABI plugin --all would stop on the first loop and return nothing. If there's no ABI plugin we should only check for LLDB_INVALID_ADDRESS. Depends on D134029 Reviewed By: labath Differential Revision: https://reviews.llvm.org/D134030
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index 33c40a9..e42665b 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -1821,7 +1821,7 @@ protected:
// When there are non-address bits the last range will not extend
// to LLDB_INVALID_ADDRESS but to the max virtual address.
// This prevents us looping forever if that is the case.
- (abi && (abi->FixAnyAddress(addr) == addr))) {
+ (!abi || (abi->FixAnyAddress(addr) == addr))) {
lldb_private::MemoryRegionInfo region_info;
error = process_sp->GetMemoryRegionInfo(addr, region_info);