[Lldb-commits] [lldb] [lldb] Propagate ExpressionErrors from ValueObjectPrinter::GetDescriptionForDisplay (PR #152417)

via lldb-commits lldb-commits at lists.llvm.org
Thu Aug 7 11:25:38 PDT 2025


jimingham wrote:

The way we've been doing the `po` implementations for a while now is: "If the object description succeeds, print the object description, otherwise print the value."  This routine gets used here:

      llvm::Expected<std::string> object_desc =
          (value_printed || summary_printed)
              ? GetMostSpecializedValue().GetObjectDescription()
              : GetDescriptionForDisplay();

So it's supposed to handle the case where we haven't yet printed any value or summary for the `po` result.  By returning if you see an expression error, you're changing this UI to NOT print the value if the `po` expression fails for some reason.

Is that your intent?

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


More information about the lldb-commits mailing list