[lldbsuite, windows] Don't crash LLDB when we try to retrieve a register on Windows
authorStella Stamenova <stilis@microsoft.com>
Mon, 2 Jul 2018 21:50:31 +0000 (21:50 +0000)
committerStella Stamenova <stilis@microsoft.com>
Mon, 2 Jul 2018 21:50:31 +0000 (21:50 +0000)
commit696ce3770b741ef7f913b5eda73f0b2fda24e75c
tree70a28cafc3e15e384a77dabb990792a20fb7afff
parent2443bbd4aacd73b61cffe8e7a80a8a320b14dcde
[lldbsuite, windows] Don't crash LLDB when we try to retrieve a register on Windows

Summary:
1) When ReadRegister is called with a null register into on Windows, rather than crashing due to an access violation, simply return false. Not all registers and properties will be read or calculated correctly, but that is consistent with other platforms that also return false in that case
2) Update a couple of tests to reference pr37995 as their reason for failure since it is much more accurate. Support for floating point registers doesn't exist on Windows at all, rather than having issues.

Reviewers: asmith, labath, zturner

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D48844

llvm-svn: 336147
lldb/packages/Python/lldbsuite/test/functionalities/register/intel_avx/TestYMMRegister.py
lldb/packages/Python/lldbsuite/test/functionalities/register/register_command/TestRegisters.py
lldb/packages/Python/lldbsuite/test/lang/cpp/trivial_abi/TestTrivialABI.py
lldb/source/Plugins/Process/Windows/Common/x64/RegisterContextWindows_x64.cpp
lldb/source/Plugins/Process/Windows/Common/x86/RegisterContextWindows_x86.cpp