diff --git a/lldb/source/DataFormatters/ValueObjectPrinter.cpp b/lldb/source/DataFormatters/ValueObjectPrinter.cpp index 173050b46911..863ff3af12e8 100644 --- a/lldb/source/DataFormatters/ValueObjectPrinter.cpp +++ b/lldb/source/DataFormatters/ValueObjectPrinter.cpp @@ -457,7 +457,12 @@ bool ValueObjectPrinter::PrintObjectDescriptionIfNeeded(bool value_printed, else object_desc = GetDescriptionForDisplay(); if (object_desc && *object_desc) { - m_stream->Printf("%s\n", object_desc); + // If the description already ends with a \n don't add another one. + size_t object_end = strlen(object_desc) - 1; + if (object_desc[object_end] == '\n') + m_stream->Printf("%s", object_desc); + else + m_stream->Printf("%s\n", object_desc); return true; } else if (value_printed == false && summary_printed == false) return true;