[Lldb-commits] [PATCH] D46576: [DWARF] Align non-accelerated function fullname searching with the apple-tables path
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 8 09:26:53 PDT 2018
labath added inline comments.
================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:905-908
ConstString demangled = mangled.GetDemangledName(cu_language);
if (demangled)
func_fullnames.Insert(demangled,
DIERef(cu_offset, die.GetOffset()));
----------------
clayborg wrote:
> Should we remove these 4 lines now? I thought we weren't going to add demangled names to the index?
I was saving that for a separate patch.
================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp:928-929
Mangled mangled(ConstString(mangled_cstr), true);
+ func_basenames.Insert(mangled.GetMangledName(),
+ DIERef(cu_offset, die.GetOffset()));
func_fullnames.Insert(mangled.GetMangledName(),
----------------
clayborg wrote:
> Why are we adding the mangled name to the basenames?
It was the simplest way to ensure we get the same results for apple and !apple cases. With apple tables we will return a result if someone asks for a function with a "base name" `_Z3foov`. I am not sure if this was intended or just an accident. Alternatively, I could keep these names in a separate index and then search in both when I get a query. Or, if this is really not intended to work, I can adding extra filtering to the "apple" path to return only "real" basenames. (My goal here is to eliminate platform differences to avoid things behaving differently across platforms.)
https://reviews.llvm.org/D46576
More information about the lldb-commits
mailing list