[Lldb-commits] [PATCH] D145629: When a ValueObjectDynamicValue fails to update, return a not valid ValueObject so the static one is used instead
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 9 09:50:32 PST 2023
jingham added inline comments.
================
Comment at: lldb/source/Core/ValueObject.cpp:1862
}
- if (m_dynamic_value)
+ if (m_dynamic_value && m_dynamic_value->GetError().Success())
return m_dynamic_value->GetSP();
----------------
mib wrote:
> It would be nice if `ValueObjectDynamicValue` had a `IsValid` method that returned the result of its Status attribute. Without reading the commit message, `GetError` doesn't tell us much about what we're trying to achieve here.
IsValid is less restrictive than having an error. IsValid is true if the value has a variable in it, even if, for instance, we couldn't currently read the memory underlying the value. I want "was there any error at all", so checking the Error is more appropriate here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145629/new/
https://reviews.llvm.org/D145629
More information about the lldb-commits
mailing list