[Lldb-commits] [PATCH] D46576: [DWARF] Align non-accelerated function fullname searching with the apple-tables path
Greg Clayton via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue May 8 09:30:12 PDT 2018
clayborg added inline comments.
================
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(),
----------------
labath wrote:
> 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.)
I would search "func_fullnames" and "func_basenames" separately and avoid adding the extra mangled name to func_basenames.
The _Z3foov seems like an accident. It definitely shouldn't be a basename unless the DWARF put that into the DW_AT_name field for some reason.
https://reviews.llvm.org/D46576
More information about the lldb-commits
mailing list