From d228483d8c579930d490053ca9944bb04d908ee8 Mon Sep 17 00:00:00 2001 From: Enrico Granata Date: Wed, 17 Oct 2012 22:23:56 +0000 Subject: Improvements to the data formatters logging - plus, new log messages when our dynamic type changes llvm-svn: 166133 --- lldb/source/Core/ValueObjectDynamicValue.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'lldb/source/Core/ValueObjectDynamicValue.cpp') diff --git a/lldb/source/Core/ValueObjectDynamicValue.cpp b/lldb/source/Core/ValueObjectDynamicValue.cpp index b6d29d47b5b..2921e9d1bf9 100644 --- a/lldb/source/Core/ValueObjectDynamicValue.cpp +++ b/lldb/source/Core/ValueObjectDynamicValue.cpp @@ -14,6 +14,7 @@ // C++ Includes // Other libraries and framework includes // Project includes +#include "lldb/Core/Log.h" #include "lldb/Core/Module.h" #include "lldb/Core/ValueObjectList.h" #include "lldb/Core/Value.h" @@ -287,10 +288,17 @@ ValueObjectDynamicValue::UpdateValue () Value old_value(m_value); + lldb::LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_TYPES)); + if (!m_type_sp) { m_type_sp = dynamic_type_sp; ResetCompleteTypeInfo (); + if (log) + log->Printf("[%s %p] now has a dynamic type %s", + GetName().GetCString(), + this, + GetTypeName().AsCString("")); } else if (dynamic_type_sp != m_type_sp) { @@ -298,6 +306,11 @@ ValueObjectDynamicValue::UpdateValue () m_type_sp = dynamic_type_sp; SetValueDidChange (true); ResetCompleteTypeInfo (); + if (log) + log->Printf("[%s %p] has a new dynamic type %s", + GetName().GetCString(), + this, + GetTypeName().AsCString("")); } if (!m_address.IsValid() || m_address != dynamic_address) -- cgit v1.2.3