From c358da2f4bda5faf1a9fa72706a485acaa04551d Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Fri, 22 Feb 2013 20:01:15 +0000 Subject: [PATCH] If we crash while making a Python summary, the crash info will tell us more about it llvm-svn: 175915 --- lldb/source/DataFormatters/TypeSummary.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lldb/source/DataFormatters/TypeSummary.cpp b/lldb/source/DataFormatters/TypeSummary.cpp index cfff97d..ae6fe7d 100644 --- a/lldb/source/DataFormatters/TypeSummary.cpp +++ b/lldb/source/DataFormatters/TypeSummary.cpp @@ -28,6 +28,8 @@ #include "lldb/Target/StackFrame.h" #include "lldb/Target/Target.h" +#include "lldb/Host/Host.h" + using namespace lldb; using namespace lldb_private; @@ -199,6 +201,13 @@ ScriptSummaryFormat::FormatObject (ValueObject *valobj, { Timer scoped_timer (__PRETTY_FUNCTION__, __PRETTY_FUNCTION__); + if (!valobj) + return false; + + Host::SetCrashDescriptionWithFormat("[Python summary] Name: %s - Function: %s", + valobj->GetName().AsCString("unknown"), + m_function_name.c_str()); + TargetSP target_sp(valobj->GetTargetSP()); if (!target_sp) -- 2.7.4