[Lldb-commits] [lldb] [lldb] Print ValueObject when GetObjectDescription fails (PR #152417)

Dave Lee via lldb-commits lldb-commits at lists.llvm.org
Fri Aug 15 08:37:01 PDT 2025


================
@@ -150,6 +151,11 @@ llvm::Expected<std::string> ValueObjectPrinter::GetDescriptionForDisplay() {
   if (maybe_str)
     return maybe_str;
 
+  if (maybe_str.errorIsA<lldb_private::ExpressionError>())
+    // Propagate expression errors to expose diagnostics to the user.
+    // Without this early exit, the summary/value may be shown without errors.
+    return maybe_str;
+
----------------
kastiglione wrote:

@adrian-prantl I've added a test for this with the recent reworking. See TestObjCFailingDescription.py 

https://github.com/llvm/llvm-project/pull/152417


More information about the lldb-commits mailing list