[LLDB] Fix aggregate-indirect-arg.cpp failure introduced by 227dffd0b6d78154516ace45f...
authorZequan Wu <zequanwu@google.com>
Thu, 7 Jul 2022 21:56:19 +0000 (14:56 -0700)
committerZequan Wu <zequanwu@google.com>
Thu, 7 Jul 2022 22:01:07 +0000 (15:01 -0700)
lldb/source/Expression/DWARFExpressionList.cpp

index e13a293..68e3e8c 100644 (file)
@@ -204,8 +204,11 @@ bool DWARFExpressionList::Evaluate(ExecutionContext *exe_ctx,
     }
     addr_t addr = pc.GetFileAddress();
     const auto *entry = m_exprs.FindEntryThatContains(addr);
-    if (!entry)
+    if (!entry) {
+      if (error_ptr)
+        error_ptr->SetErrorString("variable not available");
       return false;
+    }
     expr = entry->data;
   }
   expr.GetExpressionData(data);