[Lldb-commits] [PATCH] D92643: [lldb] Lookup static const members in FindGlobalVariables
Jan Kratochvil via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sat Feb 6 01:23:56 PST 2021
jankratochvil added a comment.
@werat I see you are aware of D81471 <https://reviews.llvm.org/D81471>. Do you or someone else have anything against it? I find it more integrated using the clang type for it but I admit I do not understand the clang integration much. At least it handles more cases, I stopped after finding:
$ echo 'struct Vars { static const int i = 2; } v; int main() {}'|./bin/clang -Wall -g -x c++ -;./bin/lldb -b ./a.out -o 'p Vars::i'
error: Can't evaluate the expression without a running target due to: Interpreter doesn't handle one of the expression's operands
vs. D81471's:
(const int) $0 = 2
================
Comment at: lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp:3162
+ case DW_AT_decl_file:
+ decl.SetFile(sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(
+ form_value.Unsigned()));
----------------
Here should be according to my D91014:
```
decl.SetFile(attributes.CompileUnitAtIndex(i)->GetFile(
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92643/new/
https://reviews.llvm.org/D92643
More information about the lldb-commits
mailing list