[Lldb-commits] [PATCH] D55575: [NativePDB] Support local variables
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Dec 11 13:24:09 PST 2018
zturner created this revision.
zturner added reviewers: labath, lemo, aleksandr.urakov, amccarth, clayborg, leonid.mashinskiy.
Herald added subscribers: JDevlieghere, aprantl.
This patch adds support for parsing and evaluating local variables. using the native pdb plugin.
While implementing this, I came up with several new ideas for increasing test coverage throughout LLDB (not limited to this plugin), including:
- We should start extending AST tests to other types of targets and debug info, not just windows / native pdb. This uncovered a few bugs for me here that allowed me to proceed.
- We should have comprehensive test coverage of the DWARFExpression evaluator in lldb/Expression/DWARFExpression.cpp. This would allow us to improve test coverage of scenarios that require compilers to emit specific debug info, and allow us to do it in a way that doesn't require that debug info to have been emitted by some compiler.
- We should add options to `lldb-test` that will allow it to call into `SymbolFile::ResolveSymbolContext` and dump the output in some format that is interesting for file checking. This function is at the heart of a lot of logic, and if it doesn't work, many things will fail. Being able to test all of the edge cases of this function would weed out a lot of problems.
Anyway, for now these are all just ideas. For this patch, I've just implemented support for local variables and a test to make sure it works. One interesting thing: With the old PDB plugin, this test takes over 1 minute to run. With the new PDB plugin, it takes about 2 seconds.
https://reviews.llvm.org/D55575
Files:
lldb/lit/SymbolFile/NativePDB/Inputs/local-variables.lldbinit
lldb/lit/SymbolFile/NativePDB/local-variables.cpp
lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.cpp
lldb/source/Plugins/SymbolFile/NativePDB/DWARFLocationExpression.h
lldb/source/Plugins/SymbolFile/NativePDB/PdbSymUid.h
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp
lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h
lldb/source/Symbol/ClangASTContext.cpp
llvm/include/llvm/Support/BinaryStreamArray.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55575.177768.patch
Type: text/x-patch
Size: 55691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181211/4c3c327a/attachment-0001.bin>
More information about the lldb-commits
mailing list