[LLDB] - Improved DWARF5 support.

This patch improves the support of DWARF5.
Particularly the reporting of source code locations.

Differential revision: https://reviews.llvm.org/D51935

llvm-svn: 342153
This commit is contained in:
George Rimar
2018-09-13 17:06:47 +00:00
parent f353ae1848
commit c6c7bfc4d2
18 changed files with 393 additions and 81 deletions

View File

@@ -225,7 +225,8 @@ void DebugNamesDWARFIndex::GetFunctions(
const CompilerDeclContext &parent_decl_ctx, uint32_t name_type_mask,
std::vector<DWARFDIE> &dies) {
m_fallback.GetFunctions(name, info, parent_decl_ctx, name_type_mask, dies);
std::vector<DWARFDIE> v;
m_fallback.GetFunctions(name, info, parent_decl_ctx, name_type_mask, v);
for (const DebugNames::Entry &entry :
m_debug_names_up->equal_range(name.GetStringRef())) {
@@ -235,8 +236,13 @@ void DebugNamesDWARFIndex::GetFunctions(
if (DIERef ref = ToDIERef(entry))
ProcessFunctionDIE(name.GetStringRef(), ref, info, parent_decl_ctx,
name_type_mask, dies);
name_type_mask, v);
}
std::set<DWARFDebugInfoEntry *> seen;
for (DWARFDIE die : v)
if (seen.insert(die.GetDIE()).second)
dies.push_back(die);
}
void DebugNamesDWARFIndex::GetFunctions(const RegularExpression &regex,