[Lldb-commits] [lldb] r178265 - Hardening the vector iterator synthetic child(ren) provider against item-not-in-cluster asserts
Enrico Granata
egranata at apple.com
Thu Mar 28 11:50:54 PDT 2013
Author: enrico
Date: Thu Mar 28 13:50:54 2013
New Revision: 178265
URL: http://llvm.org/viewvc/llvm-project?rev=178265&view=rev
Log:
Hardening the vector iterator synthetic child(ren) provider against item-not-in-cluster asserts
Modified:
lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp
Modified: lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp?rev=178265&r1=178264&r2=178265&view=diff
==============================================================================
--- lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp (original)
+++ lldb/trunk/source/DataFormatters/CXXFormatterFunctions.cpp Thu Mar 28 13:50:54 2013
@@ -958,6 +958,8 @@ m_item_sp()
bool
lldb_private::formatters::VectorIteratorSyntheticFrontEnd::Update()
{
+ m_item_sp.reset();
+
ValueObjectSP valobj_sp = m_backend.GetSP();
if (!valobj_sp)
return false;
@@ -975,7 +977,7 @@ lldb_private::formatters::VectorIterator
m_item_sp = ValueObject::CreateValueObjectFromAddress("item", item_ptr->GetValueAsUnsigned(0), m_exe_ctx_ref, ClangASTType(item_ptr->GetClangAST(),ClangASTType::GetPointeeType(item_ptr->GetClangType())));
if (err.Fail())
m_item_sp.reset();
- return (m_item_sp.get() != NULL);
+ return false;
}
size_t
More information about the lldb-commits
mailing list