[Lldb-commits] [lldb] [lldb] Fallback to expression eval when Dump of variable fails in dwim-print (PR #151374)

Augusto Noronha via lldb-commits lldb-commits at lists.llvm.org
Wed Jul 30 12:46:15 PDT 2025


================
@@ -186,8 +182,11 @@ void CommandObjectDWIMPrint::DoExecute(StringRef command,
                                      expr);
       }
 
-      dump_val_object(*valobj_sp);
-      return;
+      bool failed = errorToBool(dump_val_object(*valobj_sp));
----------------
augusto2112 wrote:

Looks like this loses the error, should this be preserved somehow? You could log these errors in case the overall operation succeeds and maybe  combine the errors with AppendError if the overall operation fails. 

Not sure what the best way to do this would be, but it would be good to not lose the error if possible.

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


More information about the lldb-commits mailing list