[Lldb-commits] [lldb] Convert ValueObject::Dump() to return llvm::Error() (NFCish) (PR #95857)

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 18 13:32:51 PDT 2024


================
@@ -1233,7 +1233,10 @@ bool SBValue::GetDescription(SBStream &description) {
     DumpValueObjectOptions options;
     options.SetUseDynamicType(m_opaque_sp->GetUseDynamic());
     options.SetUseSyntheticValue(m_opaque_sp->GetUseSynthetic());
-    value_sp->Dump(strm, options);
+    if (llvm::Error error = value_sp->Dump(strm, options)) {
+      strm << "error: " << toString(std::move(error));
+      return false;
----------------
adrian-prantl wrote:

Yeah this is a drive-by fix where I'm pretty sure that this is the better behavior.
In practice no ObjC object description ever fails completely, so I don't know how to test this.

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


More information about the lldb-commits mailing list