mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 13:21:04 +08:00
[lldb][DebugNamesDWARF] Also use mangled name when matching regex
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. It is important to do so, otherwise queries like `frame var --regex A::` would never work. 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. Differential Revision: https://reviews.llvm.org/D154617
This commit is contained in:
@@ -104,7 +104,8 @@ void DebugNamesDWARFIndex::GetGlobalVariables(
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user