diff options
author | Aleksandr Urakov <aleksandr.urakov@jetbrains.com> | 2018-11-30 07:12:22 +0000 |
---|---|---|
committer | Aleksandr Urakov <aleksandr.urakov@jetbrains.com> | 2018-11-30 07:12:22 +0000 |
commit | e0366d1db51d3f8cc5caf13db12532d0a721b027 (patch) | |
tree | 20b85f4998928f6900472cd77949bc42e61a979e /lldb/source/Plugins/Process/Windows | |
parent | b1d014883ccd66659ccf4b8099bf33cbb4853de6 (diff) | |
download | bcm5719-llvm-e0366d1db51d3f8cc5caf13db12532d0a721b027.tar.gz bcm5719-llvm-e0366d1db51d3f8cc5caf13db12532d0a721b027.zip |
[PDB] Support PDB-backed expressions evaluation
Summary:
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.
Reviewers: zturner, asmith, stella.stamenova
Reviewed By: stella.stamenova, asmith
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D53759
llvm-svn: 347962
Diffstat (limited to 'lldb/source/Plugins/Process/Windows')
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp index b6ba70289d9..a121f8d3afd 100644 --- a/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/ProcessWindows.cpp @@ -957,8 +957,9 @@ ProcessWindows::OnDebugException(bool first_chance, } if (!first_chance) { - // Any second chance exception is an application crash by definition. - SetPrivateState(eStateCrashed); + // Not any second chance exception is an application crash by definition. + // It may be an expression evaluation crash. + SetPrivateState(eStateStopped); } ExceptionResult result = ExceptionResult::SendToApplication; diff --git a/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp index b3f507128f8..cd4f3f64b9b 100644 --- a/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp +++ b/lldb/source/Plugins/Process/Windows/Common/RegisterContextWindows.cpp @@ -42,7 +42,7 @@ bool RegisterContextWindows::ReadAllRegisterValues( lldb::DataBufferSP &data_sp) { if (!CacheAllRegisterValues()) return false; - if (data_sp->GetByteSize() < sizeof(m_context)) { + if (!data_sp || data_sp->GetByteSize() < sizeof(m_context)) { data_sp.reset(new DataBufferHeap(sizeof(CONTEXT), 0)); } memcpy(data_sp->GetBytes(), &m_context, sizeof(m_context)); |