fdeazeve created this revision. Herald added a subscriber: arphaman. Herald added a project: All. fdeazeve requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
When LLDB queries the debug names index with a regex, we should use the `Mangled` class wrapper, which attempts to match regex first against the mangled name and then against the demangled name. This is what is done for the Apple index as well. This fixes test/API/lang/cpp/class_static/main.cpp when compiled with DWARF 5. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D154617 Files: lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp Index: lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp @@ -104,7 +104,8 @@ llvm::function_ref<bool(DWARFDIE die)> callback) { for (const DebugNames::NameIndex &ni: *m_debug_names_up) { for (DebugNames::NameTableEntry nte: ni) { - if (!regex.Execute(nte.getString())) + Mangled mangled_name(nte.getString()); + if (!mangled_name.NameMatches(regex)) continue; uint64_t entry_offset = nte.getEntryOffset();
Index: lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp =================================================================== --- lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp +++ lldb/source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp @@ -104,7 +104,8 @@ llvm::function_ref<bool(DWARFDIE die)> callback) { for (const DebugNames::NameIndex &ni: *m_debug_names_up) { for (DebugNames::NameTableEntry nte: ni) { - if (!regex.Execute(nte.getString())) + Mangled mangled_name(nte.getString()); + if (!mangled_name.NameMatches(regex)) continue; uint64_t entry_offset = nte.getEntryOffset();
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits