[Lldb-commits] [lldb] r245237 - Make sure to save the types we parse in our SymbolFile's type list so they don't get deleted.
Greg Clayton via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 17 13:31:47 PDT 2015
Author: gclayton
Date: Mon Aug 17 15:31:46 2015
New Revision: 245237
URL: http://llvm.org/viewvc/llvm-project?rev=245237&view=rev
Log:
Make sure to save the types we parse in our SymbolFile's type list so they don't get deleted.
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=245237&r1=245236&r2=245237&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Aug 17 15:31:46 2015
@@ -3789,15 +3789,23 @@ SymbolFileDWARF::FindDefinitionTypeForDW
TypeSP
SymbolFileDWARF::ParseType (const SymbolContext& sc, DWARFCompileUnit* dwarf_cu, const DWARFDebugInfoEntry *die, bool *type_is_new_ptr)
{
+ TypeSP type_sp;
+
TypeSystem *type_system = GetTypeSystemForLanguage(dwarf_cu->GetLanguageType());
if (type_system)
{
Log *log = LogChannelDWARF::GetLogIfAll(DWARF_LOG_DEBUG_INFO);
- return type_system->ParseTypeFromDWARF (sc, this, dwarf_cu, die, log, type_is_new_ptr);
+ type_sp = type_system->ParseTypeFromDWARF (sc, this, dwarf_cu, die, log, type_is_new_ptr);
+ if (type_sp)
+ {
+ TypeList* type_list = GetTypeList();
+ if (type_list)
+ type_list->Insert(type_sp);
+ }
}
- else
- return TypeSP();
+
+ return type_sp;
}
size_t
More information about the lldb-commits
mailing list