[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 04:59:57 PDT 2018


labath created this revision.
labath added reviewers: clayborg, JDevlieghere.

Before this patch the two paths were doing very different things

- the apple path searched the .apple_names section, which contained mangled names, as well as basenames of all functions. It returned any name it found.
- the non-accelerated path looked in the "full name" index we built ourselves, which contained mangled as well as demangled names of all functions (but no basenames). Then however, if it did not find a match it did an extra search in the basename index, with some special handling for anonymous namespaces.

This aligns the two paths by changing the non-accelerated path to return
the same results as in the apple-tables one. In pratice, this means we
will search in both the "basename" and "method" indexes (in the manual
indexes we keep methods separately). This means the function will return
some slightly inappropriate results (e.g. bar::baz::foo when one asks
for a "full name" foo), but this can be handled by additional filtering,
independently indexing method. To make this work, I've also started
inserting mangled names into the manual "basename" index.

I've also stopped matching demangled names when a regex search is
requested as that is not what apple tables do.

After this change the manual "fullname" is unused and can be removed.


https://reviews.llvm.org/D46576

Files:
  lit/SymbolFile/DWARF/find-basic-function.cpp
  source/Plugins/SymbolFile/DWARF/DWARFUnit.cpp
  source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46576.145669.patch
Type: text/x-patch
Size: 6191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180508/230874f6/attachment.bin>


More information about the lldb-commits mailing list