[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
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14122 bytes
Desc: not available
More information about the lldb-commits