From e861d053dd43f2e5a63f150ee2f9d1d643ea29c1 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Thu, 3 Nov 2022 11:25:40 -0700 Subject: [lldb/Utility] Add GetDescription(Stream&) to StructureData::* This patch improves the StructuredData classes to provide a GetDescription(lldb_private::Stream&) affordance. This is very convenient compared to the Dump method because this try to pretty print the structure instead of just serializing it into a JSON. This patch also updates some parts of lldb (i.e. extended crash info) to use this new affordance instead of StructuredData::Dump. Differential Revision: https://reviews.llvm.org/D135547 Signed-off-by: Med Ismail Bennani --- lldb/source/Commands/CommandObjectProcess.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lldb/source/Commands/CommandObjectProcess.cpp') diff --git a/lldb/source/Commands/CommandObjectProcess.cpp b/lldb/source/Commands/CommandObjectProcess.cpp index 28a99ea3d94a..92544c564e53 100644 --- a/lldb/source/Commands/CommandObjectProcess.cpp +++ b/lldb/source/Commands/CommandObjectProcess.cpp @@ -1537,8 +1537,9 @@ protected: StructuredData::DictionarySP crash_info_sp = *expected_crash_info; if (crash_info_sp) { + strm.EOL(); strm.PutCString("Extended Crash Information:\n"); - crash_info_sp->Dump(strm); + crash_info_sp->GetDescription(strm); } } -- cgit v1.2.3