[Lldb-commits] [lldb] [lldb] Fix DIL error diagnostics output (PR #187680)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Wed Apr 1 04:10:57 PDT 2026
================
@@ -637,8 +637,21 @@ may even involve JITing and running code in the target program.)");
Stream &output_stream = result.GetOutputStream();
options.SetRootValueObjectName(
valobj_sp->GetParent() ? entry.c_str() : nullptr);
- if (llvm::Error error = valobj_sp->Dump(output_stream, options))
- result.AppendError(toString(std::move(error)));
+ // Check only the `error` argument, because doing
+ // `valobj_sp->GetError()` will update the value and potentially
+ // return a new error that happens during the update, even if
+ // `GetValueForVariableExpressionPath` reported no errors.
----------------
Michael137 wrote:
This comment confuses me a little. Maybe we don't need the comment at all.
It looks like we used to not check `error` after calling `GetValueForVariableExpressionPath` above. But this patch makes it so we do check it. And if an error occurred we don't try to call `Dump`?
https://github.com/llvm/llvm-project/pull/187680
More information about the lldb-commits
mailing list