forked from OSchip/llvm-project
Fix FreeBSD crash after r233837
The FreeBSD debug register access is a little usual, but in any case different from Linux. As it stands it's not possible to share an implementation of DR_OFFSET, so revert that part of r233837 and provide a separate FreeBSD and Linux implementation. We'll still want a better fix, but this should restore basic functionality (and the buildbot). llvm-svn: 234048
This commit is contained in:
parent
72553767d5
commit
4b1063c76c
|
@ -62,6 +62,9 @@ struct UserArea
|
|||
DBG dbg;
|
||||
};
|
||||
|
||||
#define DR_OFFSET(reg_index) \
|
||||
(LLVM_EXTENSION offsetof(DBG, dr[reg_index]))
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64 structure.
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -73,6 +73,11 @@ struct UserArea
|
|||
uint64_t fault_address; // Control register CR3.
|
||||
};
|
||||
|
||||
|
||||
#define DR_OFFSET(reg_index) \
|
||||
(LLVM_EXTENSION offsetof(UserArea, dbg) + \
|
||||
LLVM_EXTENSION offsetof(DBG, dr[reg_index]))
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Include RegisterInfos_x86_64 to declare our g_register_infos_x86_64 structure.
|
||||
//---------------------------------------------------------------------------
|
||||
|
|
|
@ -27,10 +27,6 @@
|
|||
LLVM_EXTENSION offsetof(XSAVE, ymmh[reg_index]) + \
|
||||
(32 * reg_index))
|
||||
|
||||
#define DR_OFFSET(reg_index) \
|
||||
(LLVM_EXTENSION offsetof(UserArea, dbg) + \
|
||||
LLVM_EXTENSION offsetof(DBG, dr[reg_index]))
|
||||
|
||||
#ifdef DECLARE_REGISTER_INFOS_X86_64_STRUCT
|
||||
|
||||
// Number of bytes needed to represent a FPR.
|
||||
|
|
Loading…
Reference in New Issue