[Lldb-commits] [lldb] [lldb] Handle an empty SBMemoryRegionInfo from scripted process (PR #115963)
Jason Molenda via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 12 18:34:05 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)) {
----------------
jasonmolenda wrote:
I'm not wedded to it. I'm still debating moving both of these checks up in to Process::GetMemoryRegionInfo. I haven't done it yet for fear of unintended consequences, but any memory region info response that claims 0 bytes or the entire address space is meaningless.
https://github.com/llvm/llvm-project/pull/115963
More information about the lldb-commits
mailing list