[Lldb-commits] [PATCH] D129682: [lldb] Filter DIEs based on qualified name when possible

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 26 14:38:05 PDT 2022


clayborg added inline comments.


================
Comment at: lldb/source/Core/Module.cpp:730
 
+bool Module::LookupInfo::NameMatchesLookupInfo(
+    ConstString function_name, LanguageType language_type) const {
----------------
So this function can end up being called with an empty function_name when there is no mangled name (see comment in DWARFIndex.cpp). If there is no language then we return true, but what does a language plug-in do in DemangledNameContainsPath? The same thing?

I guess this means if you lookup "foo::erase" and you get a DIE that has "erase" as its DW_AT_name, but the DIE has no DW_AT_mangled (yes, some C++ debug info is emitted without a mangled name), that it will match any DIE that has a DW_AT_name that matches "erase" regardless of the actual decl context?


================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFIndex.cpp:37
+    Mangled mangled_name(die.GetMangledName());
+    if (!lookup_info.NameMatchesLookupInfo(mangled_name.GetDemangledName(),
+                                           lookup_info.GetLanguageType()))
----------------
So this looks like this can be called with an empty named since not all DIEs have mangled names. Do we not want to try and calculate the demangled name here if the mangled name is empty?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129682/new/

https://reviews.llvm.org/D129682



More information about the lldb-commits mailing list