================ @@ -735,14 +735,25 @@ size_t ValueObject::GetPointeeData(DataExtractor &data, uint32_t item_idx, case eAddressTypeLoad: { ExecutionContext exe_ctx(GetExecutionContextRef()); Process *process = exe_ctx.GetProcessPtr(); - if (process) { + if (process && process->IsLiveDebugSession()) { heap_buf_ptr->SetByteSize(bytes); size_t bytes_read = process->ReadMemory( addr + offset, heap_buf_ptr->GetBytes(), bytes, error); if (error.Success() || bytes_read > 0) { data.SetData(data_sp); return bytes_read; } + } else if (Target *target = exe_ctx.GetTargetPtr()) { + Address target_addr; + target_addr.SetLoadAddress(addr + offset, target); + heap_buf_ptr->SetByteSize(bytes); + size_t bytes_read = + target->ReadMemory(target_addr, heap_buf_ptr->GetBytes(), bytes, + error, /*force_live_memory=*/true); ---------------- DavidSpickett wrote:
force_live_memory being true seems backwards, but I suppose that it has no effect here because we know we're not in a live session. Should it be false just for consistency? Maybe not, because this `else if` executes if either `process` is null, or we are not in a live process. If it's the former condition then we do want to force live memory. Is that your logic here? https://github.com/llvm/llvm-project/pull/139196 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits