diff options
| author | Guilherme Andrade <guiandrade@google.com> | 2019-10-31 10:46:58 +0100 |
|---|---|---|
| committer | Pavel Labath <pavel@labath.sk> | 2019-10-31 10:58:17 +0100 |
| commit | e46c6644db8432584e82ef7ddfc9d0f36543f205 (patch) | |
| tree | 806bfb6bceabcac722222a426a83059406e2d1e1 /lldb/source/Plugins/Process/Utility | |
| parent | 92aa0c2dbcb723d102c508f6e7559330b637f912 (diff) | |
| download | bcm5719-llvm-e46c6644db8432584e82ef7ddfc9d0f36543f205.tar.gz bcm5719-llvm-e46c6644db8432584e82ef7ddfc9d0f36543f205.zip | |
[lldb] Fix offset intersection bug between MPX and AVX registers
Summary:
This change increases the offset of MPX registers (by 128) so they
do not overlap with the offset associated with AVX registers. That was
causing MPX data in GDBRemoteRegisterContext::m_reg_data to get overwritten.
Reviewers: labath
Reviewed By: labath
Subscribers: JDevlieghere, lldb-commits
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D68874
Diffstat (limited to 'lldb/source/Plugins/Process/Utility')
| -rw-r--r-- | lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h index 4a3b3c73fd6..af3027afa73 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h +++ b/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h @@ -25,15 +25,18 @@ LLVM_EXTENSION offsetof(FPR, xsave) + \ LLVM_EXTENSION offsetof(XSAVE, ymmh[0]) + (32 * reg_index)) +// Guarantees BNDR/BNDC offsets do not overlap with YMM offsets. +#define GDB_REMOTE_OFFSET 128 + #define BNDR_OFFSET(reg_index) \ (LLVM_EXTENSION offsetof(UserArea, fpr) + \ LLVM_EXTENSION offsetof(FPR, xsave) + \ - LLVM_EXTENSION offsetof(XSAVE, mpxr[reg_index])) + LLVM_EXTENSION offsetof(XSAVE, mpxr[reg_index]) + GDB_REMOTE_OFFSET) #define BNDC_OFFSET(reg_index) \ (LLVM_EXTENSION offsetof(UserArea, fpr) + \ LLVM_EXTENSION offsetof(FPR, xsave) + \ - LLVM_EXTENSION offsetof(XSAVE, mpxc[reg_index])) + LLVM_EXTENSION offsetof(XSAVE, mpxc[reg_index]) + GDB_REMOTE_OFFSET) #ifdef DECLARE_REGISTER_INFOS_X86_64_STRUCT |

