================ @@ -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)) { ---------------- labath wrote:
A single region that covers the entire address space is fairly boring, but it is the kind of thing I might return as an "I don't know" value (perhaps I'm in some embedded environment where every address really is readable?). What's the problem with that kind of result? That said, I think this check could be made more robust. `(0, 0)` is the likeliest response, but doesn't this mean that we would still loop if the plugin returns `(0,1)` instead? It sounds to me that if we check that: - the returned region is of non-zero size - the returned region actually includes the address being queried (I guess this kinda subsumes the previous item) then we can guarantee forward progress no matter what the plugin returns (?) 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