[Lldb-commits] [lldb] [lldb] do not show misleading error when there is no frame (PR #119103)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 10 08:52:13 PST 2024
================
@@ -1012,33 +1006,26 @@ bool SBFrame::GetDescription(SBStream &description) {
SBValue SBFrame::EvaluateExpression(const char *expr) {
LLDB_INSTRUMENT_VA(this, expr);
- SBValue result;
std::unique_lock<std::recursive_mutex> lock;
ExecutionContext exe_ctx(m_opaque_sp.get(), lock);
StackFrame *frame = exe_ctx.GetFramePtr();
Target *target = exe_ctx.GetTargetPtr();
+ SBExpressionOptions options;
if (frame && target) {
----------------
oltolm wrote:
Then I'd leave it as is. Everywhere else it is done in the same way. E.g.
```
if (frame && target) {
lldb::DynamicValueType use_dynamic =
frame->CalculateTarget()->GetPreferDynamicValue();
sb_value = GetValueForVariablePath(var_path, use_dynamic);
}
```
or
```
if (frame && target) {
lldb::DynamicValueType use_dynamic =
frame->CalculateTarget()->GetPreferDynamicValue();
value = FindVariable(name, use_dynamic);
}
```
and so on.
https://github.com/llvm/llvm-project/pull/119103
More information about the lldb-commits
mailing list