All UnwindPlan objects are now passed around as shared pointers.
ArchDefaultUnwindPlan plug-in interfaces are now cached per architecture
instead of being leaked for every frame.
Split the ArchDefaultUnwindPlan_x86 into ArchDefaultUnwindPlan_x86_64 and
ArchDefaultUnwindPlan_i386 interfaces.
There were sporadic crashes that were due to something leaking or being
destroyed when doing stack crawls. This patch should clear up these issues.
llvm-svn: 125541
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
index 5897dbb..c470596 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
@@ -197,6 +197,14 @@
return g_dwarf_section_name;
}
+UniqueDWARFASTTypeMap &
+SymbolFileDWARF::GetUniqueDWARFASTTypeMap ()
+{
+ if (m_debug_map_symfile)
+ return m_debug_map_symfile->GetUniqueDWARFASTTypeMap ();
+ return m_unique_ast_type_map;
+}
+
ClangASTContext &
SymbolFileDWARF::GetClangASTContext ()
{
@@ -3172,10 +3180,10 @@
UniqueDWARFASTType unique_ast_entry;
if (decl.IsValid())
{
- if (m_unique_ast_type_map.Find (type_name_const_str,
- die,
- decl,
- unique_ast_entry))
+ if (GetUniqueDWARFASTTypeMap().Find (type_name_const_str,
+ die,
+ decl,
+ unique_ast_entry))
{
// We have already parsed this type or from another
// compile unit. GCC loves to use the "one definition
@@ -3273,8 +3281,8 @@
unique_ast_entry.m_type_sp = type_sp;
unique_ast_entry.m_die = die;
unique_ast_entry.m_declaration = decl;
- m_unique_ast_type_map.Insert (type_name_const_str,
- unique_ast_entry);
+ GetUniqueDWARFASTTypeMap().Insert (type_name_const_str,
+ unique_ast_entry);
if (die->HasChildren() == false && is_forward_declaration == false)
{
@@ -3824,14 +3832,6 @@
type_sp->SetSymbolContextScope(symbol_context_scope);
}
-// if (udt_sp.get())
-// {
-// if (is_forward_declaration)
-// udt_sp->GetFlags().Set(UserDefType::flagIsForwardDefinition);
-// type_sp->SetUserDefinedType(udt_sp);
-// }
-
- //printf ("Adding type to map: 0x%8.8x for %s\n", die->GetOffset(), type_sp->GetName().GetCString());
// We are ready to put this type into the uniqued list up at the module level
type_list->Insert (type_sp);