From f18c03e49e1867db55c5f641e3b53f4521cb5db8 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 4 Apr 2012 17:34:10 +0000 Subject: [PATCH] Attempt at fixing a crasher where summary strings where looping endlessly. llvm-svn: 154028 --- lldb/include/lldb/Core/ValueObject.h | 1 - lldb/source/Core/ValueObject.cpp | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lldb/include/lldb/Core/ValueObject.h b/lldb/include/lldb/Core/ValueObject.h index 4c8a6af3c931..b9c3a3c4d3a1 100644 --- a/lldb/include/lldb/Core/ValueObject.h +++ b/lldb/include/lldb/Core/ValueObject.h @@ -966,7 +966,6 @@ public: { m_type_summary_sp = format; ClearUserVisibleData(eClearUserVisibleDataItemsSummary); - m_is_getting_summary = false; } void diff --git a/lldb/source/Core/ValueObject.cpp b/lldb/source/Core/ValueObject.cpp index 9e27dc0b1642..800ab06bb2d5 100644 --- a/lldb/source/Core/ValueObject.cpp +++ b/lldb/source/Core/ValueObject.cpp @@ -671,6 +671,14 @@ ValueObject::GetSummaryAsCString (TypeSummaryImpl* summary_ptr, return false; m_is_getting_summary = true; + + // this is a hot path in code and we prefer to avoid setting this string all too often also clearing out other + // information that we might care to see in a crash log. might be useful in very specific situations though. + /*Host::SetCrashDescriptionWithFormat("Trying to fetch a summary for %s %s. Summary provider's description is %s", + GetTypeName().GetCString(), + GetName().GetCString(), + summary_ptr->GetDescription().c_str());*/ + if (UpdateValueIfNeeded (false)) { if (summary_ptr) @@ -3928,7 +3936,6 @@ ValueObject::ClearUserVisibleData(uint32_t clear_mask) if ((clear_mask & eClearUserVisibleDataItemsSummary) == eClearUserVisibleDataItemsSummary) { - m_is_getting_summary = false; m_summary_str.clear(); } -- GitLab