================
@@ -288,8 +288,15 @@ Status ScriptedProcess::DoGetMemoryRegionInfo(lldb::addr_t 
load_addr,
                                               MemoryRegionInfo &region) {
   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
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to