diff options
Diffstat (limited to 'lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp')
-rw-r--r-- | lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp index 43c3d7676ec..cff808bd70a 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp @@ -43,6 +43,7 @@ #include "lldb/Symbol/SymbolVendor.h" #include "lldb/Symbol/TypeSystem.h" #include "lldb/Symbol/VariableList.h" +#include "lldb/Symbol/TypeMap.h" #include "Plugins/Language/CPlusPlus/CPlusPlusLanguage.h" #include "Plugins/Language/ObjC/ObjCLanguage.h" @@ -2840,7 +2841,7 @@ SymbolFileDWARF::FindTypes (const SymbolContext& sc, const CompilerDeclContext *parent_decl_ctx, bool append, uint32_t max_matches, - TypeList& types) + TypeMap& types) { DWARFDebugInfo* info = DebugInfo(); if (info == NULL) @@ -3054,6 +3055,17 @@ SymbolFileDWARF::GetTypeForDIE (const DWARFDIE &die) CompileUnit* lldb_cu = GetCompUnitForDWARFCompUnit(die.GetCU()); assert (lldb_cu); SymbolContext sc(lldb_cu); + const DWARFDebugInfoEntry* parent_die = die.GetParent().GetDIE(); + while (parent_die != nullptr) + { + if (parent_die->Tag() == DW_TAG_subprogram) + break; + parent_die = parent_die->GetParent(); + } + SymbolContext sc_backup = sc; + if (parent_die != nullptr && !GetFunction(DWARFDIE(die.GetCU(),parent_die), sc)) + sc = sc_backup; + type_sp = ParseType(sc, die, NULL); } else if (type_ptr != DIE_IS_BEING_PARSED) |