================ @@ -2008,38 +1979,54 @@ bool CPlusPlusLanguage::HandleFrameFormatVariable( return true; } case FormatEntity::Entry::Type::FunctionReturnRight: { - std::optional<llvm::StringRef> return_rhs = GetDemangledReturnTypeRHS(sc); - if (!return_rhs) + auto return_rhs_or_err = GetDemangledReturnTypeRHS(sc); + if (!return_rhs_or_err) { + LLDB_LOG_ERROR(GetLog(LLDBLog::Language), return_rhs_or_err.takeError(), + "Failed to handle ${function.return-right} frame-format " + "variable: {0}"); return false; + } - s << *return_rhs; + s << *return_rhs_or_err; return true; } case FormatEntity::Entry::Type::FunctionReturnLeft: { - std::optional<llvm::StringRef> return_lhs = GetDemangledReturnTypeLHS(sc); - if (!return_lhs) + auto return_lhs_or_err = GetDemangledReturnTypeLHS(sc); + if (!return_lhs_or_err) { + LLDB_LOG_ERROR(GetLog(LLDBLog::Language), return_lhs_or_err.takeError(), + "Failed to handle ${function.return-left} frame-format " + "variable: {0}"); return false; + } - s << *return_lhs; + s << *return_lhs_or_err; return true; } case FormatEntity::Entry::Type::FunctionQualifiers: { - std::optional<llvm::StringRef> quals = GetDemangledFunctionQualifiers(sc); - if (!quals) + auto quals_or_err = GetDemangledFunctionQualifiers(sc); + if (!quals_or_err) { + LLDB_LOG_ERROR( + GetLog(LLDBLog::Language), quals_or_err.takeError(), + "Failed to handle ${function.qualifiers} frame-format variable: {0}"); ---------------- Michael137 wrote:
Apologies, I think you need to escape the `{` here. Since that's the syntax for specifying the format index. I think `{{` is the way to do that https://github.com/llvm/llvm-project/pull/144731 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits