Merge Linux and FreeBSD arm64 register contexts
authorPavel Labath <labath@google.com>
Fri, 25 Nov 2016 10:28:09 +0000 (10:28 +0000)
committerPavel Labath <labath@google.com>
Fri, 25 Nov 2016 10:28:09 +0000 (10:28 +0000)
commit3f8c78168e494ad89823e156cf286e0730e7b1d7
tree11719bed61bdd447f4aab2ab605bc2e4731d17cf
parentab024a353f44a803907948514f4a72de4820406c
Merge Linux and FreeBSD arm64 register contexts

Summary:
This is a test-the-water change about possibilities of reducing duplication in
the register context definitions.

I've named the new class RegisterInfoPOSIX, as RegisterContextPOSIX was already
taken :(.  The two files were identical except for a fix by Tamas in D12636,
which was applied to the Linux version only, which fixed a discrepancy between
the definitions of fpsr and fpcr on one hand, and all other floating point
register definitions on the other.

Linux test suite still passes after this change. For freebsd, make the floating
point register behavior consistent, but I don't know whether it will be
consistently fixed, or consistently broken. By eyeballing the code, I have a
feeling that a similar fix to D12636 will be required in
RegisterContextPOSIXProcessMonitor_arm64::ReadRegister, but I can't be sure as I
have no way to test it (the assert in that function should fire upon accessing
the registers if it is wrong though).

Reviewers: emaste, clayborg

Subscribers: aemerson, rengolin, beanz, mgorny, modocache, dmikulin, lldb-commits

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

llvm-svn: 287916
lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp
lldb/source/Plugins/Process/Linux/NativeRegisterContextLinux_arm64.cpp
lldb/source/Plugins/Process/Utility/CMakeLists.txt
lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.cpp [deleted file]
lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.h [deleted file]
lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.cpp [moved from lldb/source/Plugins/Process/Utility/RegisterContextLinux_arm64.cpp with 68% similarity]
lldb/source/Plugins/Process/Utility/RegisterInfoPOSIX_arm64.h [moved from lldb/source/Plugins/Process/Utility/RegisterContextLinux_arm64.h with 87% similarity]
lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp