diff options
Diffstat (limited to 'lldb/source/Interpreter/OptionValueFileSpecLIst.cpp')
-rw-r--r-- | lldb/source/Interpreter/OptionValueFileSpecLIst.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp b/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp index 7fdc3c78023..94dc9b61949 100644 --- a/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp +++ b/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp @@ -25,16 +25,24 @@ void OptionValueFileSpecList::DumpValue(const ExecutionContext *exe_ctx, if (dump_mask & eDumpOptionType) strm.Printf("(%s)", GetTypeAsCString()); if (dump_mask & eDumpOptionValue) { - if (dump_mask & eDumpOptionType) - strm.Printf(" =%s", m_current_value.GetSize() > 0 ? "\n" : ""); - strm.IndentMore(); + const bool one_line = dump_mask & eDumpOptionCommand; const uint32_t size = m_current_value.GetSize(); + if (dump_mask & eDumpOptionType) + strm.Printf(" =%s", + (m_current_value.GetSize() > 0 && !one_line) ? "\n" : ""); + if (!one_line) + strm.IndentMore(); for (uint32_t i = 0; i < size; ++i) { - strm.Indent(); - strm.Printf("[%u]: ", i); + if (!one_line) { + strm.Indent(); + strm.Printf("[%u]: ", i); + } m_current_value.GetFileSpecAtIndex(i).Dump(&strm); + if (one_line) + strm << ' '; } - strm.IndentLess(); + if (!one_line) + strm.IndentLess(); } } |