[Lldb-commits] [PATCH] D53759: [PDB] Support PDB-backed expressions evaluation
Aleksandr Urakov via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Oct 26 06:13:50 PDT 2018
aleksandr.urakov created this revision.
aleksandr.urakov added reviewers: zturner, asmith, stella.stamenova.
aleksandr.urakov added a project: LLDB.
Herald added subscribers: lldb-commits, teemperor, JDevlieghere, aprantl.
This patch contains several small fixes, which makes it possible to evaluate expressions on Windows using information from PDB. The changes are:
- several sanitize checks;
- make `IRExecutionUnit::MemoryManager::getSymbolAddress` to not return a magic value on a failure, because callers wait 0 in this case;
- entry point required to be a file address, not RVA, in the `ObjectFilePECOFF`;
- do not crash on a debuggee second chance exception - it may be an expression evaluation crash;
- create parameter declarations for functions in AST to make it possible to call debugee functions from expressions;
- relax name searching rules for variables, functions, namespaces and types. Now it works just like in the DWARF plugin;
- fix endless recursion in `SymbolFilePDB::ParseCompileUnitFunctionForPDBFunc`.
Each change is small and it is hard to test each change separately, so I think that create one review for them all is not a bad idea, especially because they make together the test to work.
I remember about the new native PDB plugin, but these changes are old enough, for last two or three weeks I'm just releasing my stash :) And some of the changes may be useful for the new plugin too.
This review depends on https://reviews.llvm.org/D52461, https://reviews.llvm.org/D52618, https://reviews.llvm.org/D53368, x64 testing depends on https://reviews.llvm.org/D53753.
Repository:
rLLDB LLDB
https://reviews.llvm.org/D53759
Files:
lit/SymbolFile/PDB/Inputs/ExpressionsTest.cpp
lit/SymbolFile/PDB/Inputs/ExpressionsTest0.script
lit/SymbolFile/PDB/Inputs/ExpressionsTest1.script
lit/SymbolFile/PDB/Inputs/ExpressionsTest2.script
lit/SymbolFile/PDB/expressions.test
source/Core/RichManglingContext.cpp
source/Expression/IRExecutionUnit.cpp
source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
source/Plugins/Process/Windows/Common/ProcessWindows.cpp
source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp
source/Plugins/SymbolFile/PDB/PDBASTParser.cpp
source/Plugins/SymbolFile/PDB/PDBASTParser.h
source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53759.171284.patch
Type: text/x-patch
Size: 13262 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20181026/05c38658/attachment-0001.bin>
More information about the lldb-commits
mailing list