[lldb] [Process/Utility] Fix DR offsets for FreeBSD
authorMichał Górny <mgorny@moritz.systems>
Wed, 11 Nov 2020 13:51:16 +0000 (14:51 +0100)
committerMichał Górny <mgorny@moritz.systems>
Thu, 12 Nov 2020 13:09:03 +0000 (14:09 +0100)
commita8bfee2a356a2e70f854bf6d0b364798f4183795
tree0aa3b8e8a9a52bebbbc9207a45d57b09c4bd47bb
parent1115d1d08302e246789b3c3915e65f3147888e47
[lldb] [Process/Utility] Fix DR offsets for FreeBSD

Fix Debug Register offsets to be specified relatively to UserArea
on FreeBSD/amd64 and FreeBSD/i386, and add them to UserArea on i386.
This fixes overlapping GPRs and DRs in gdb-remote protocol, making it
impossible to correctly get and set debug registers from the LLDB
client.

Differential Revision: https://reviews.llvm.org/D91254
lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_i386.cpp
lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_x86_64.cpp