[Lldb-commits] [lldb] [lldb] Handle an empty SBMemoryRegionInfo from scripted process (PR #115963)
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 12 16:30:04 PST 2024
================
@@ -288,8 +288,15 @@ Status ScriptedProcess::DoGetMemoryRegionInfo(lldb::addr_t load_addr,
MemoryRegionInfo ®ion) {
Status error;
if (auto region_or_err =
- GetInterface().GetMemoryRegionContainingAddress(load_addr, error))
+ GetInterface().GetMemoryRegionContainingAddress(load_addr, error)) {
region = *region_or_err;
+ if (region.GetRange().GetRangeBase() == 0 &&
+ (region.GetRange().GetByteSize() == 0 ||
+ region.GetRange().GetByteSize() == LLDB_INVALID_ADDRESS)) {
----------------
JDevlieghere wrote:
Why would the size be `LLDB_INVALID_ADDRESS`? Did you mean to check that the range base isn't `LLDB_INVALID_ADDRESS`?
Is this the condition you want?
```
(region.GetRange().GetRangeBase() == 0 || region.GetRange().GetRangeBase() == LLDB_INVALID_ADDRESS) && region.GetRange().GetByteSize() == 0)
```
https://github.com/llvm/llvm-project/pull/115963
More information about the lldb-commits
mailing list