[Lldb-commits] [PATCH] D47781: DebugNamesDWARFIndex: Add ability to lookup variables
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Jun 6 08:51:39 PDT 2018
labath updated this revision to Diff 150149.
labath added a comment.
Ok, so it turns out we **were** passing qualified names into the
GetGlobalVariables function. In the apple-tables case we were then searching
based on the basename and completely ignoring the context. This resulted in
incorrect matches being returned (I believe this is the bug Jonas is
investigating right now). In the manual-index case, we weren't doing the search
based on the basename, but things worked because our index also contained
demangled names.
This version of the patch does the following:
- remove context handling from the index classes. The GetGlobalVariables function now takes a basename like you suggested.
- in particular, this means that the manual index can now stop storing demangled names of global variables. This makes it consistent with the other indexes and with the function case, where we removed demangled names a couple of weeks ago.
- puts the context extraction into SymbolFileDWARF, so that it is available to all indexes.
- implements context filtering ("fixing" Jonas's bug), also in SymbolFileDWARF. I am not particularly proud of how this is implemented (substring search), but this is the same way that function context pruning is done (cf. Module::LookupInfo::Prune). A more sensible framework for context handling would be in order, but I consider that out of scope for this patch.
https://reviews.llvm.org/D47781
Files:
lit/SymbolFile/DWARF/dwarf5-index-is-used.cpp
lit/SymbolFile/DWARF/find-basic-variable.cpp
lit/SymbolFile/DWARF/find-qualified-variable.cpp
source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.cpp
source/Plugins/SymbolFile/DWARF/AppleDWARFIndex.h
source/Plugins/SymbolFile/DWARF/DWARFIndex.h
source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.cpp
source/Plugins/SymbolFile/DWARF/DebugNamesDWARFIndex.h
source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.cpp
source/Plugins/SymbolFile/DWARF/ManualDWARFIndex.h
source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D47781.150149.patch
Type: text/x-patch
Size: 14122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180606/a160acc6/attachment-0001.bin>
More information about the lldb-commits
mailing list