diff options
Diffstat (limited to 'lldb/source/Plugins/Process/Utility')
7 files changed, 13 insertions, 30 deletions
diff --git a/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp b/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp index 2ccbeacc49608..ee939b01d3509 100644 --- a/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp +++ b/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp @@ -20,7 +20,7 @@ #include "lldb/Target/Target.h" #include "lldb/Target/ThreadPlanCallFunction.h" -#ifndef LLDB_DISABLE_POSIX +#if LLDB_ENABLE_POSIX #include <sys/mman.h> #else // define them diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp index 4ca33c248c6f8..173e669041517 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp @@ -21,12 +21,6 @@ #include <memory> -// Support building against older versions of LLVM, this macro was added -// recently. -#ifndef LLVM_EXTENSION -#define LLVM_EXTENSION -#endif - #include "Utility/ARM_DWARF_Registers.h" #include "Utility/ARM_ehframe_Registers.h" @@ -1146,10 +1140,11 @@ bool RegisterContextDarwin_arm::ReadRegister(const RegisterInfo *reg_info, case gpr_sp: case gpr_lr: case gpr_pc: - case gpr_cpsr: value.SetUInt32(gpr.r[reg - gpr_r0]); break; - + case gpr_cpsr: + value.SetUInt32(gpr.cpsr); + break; case fpu_s0: case fpu_s1: case fpu_s2: diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp index b3ec24d8905de..fa5197cd6bf44 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp @@ -30,12 +30,6 @@ #include <sys/sysctl.h> #endif -// Support building against older versions of LLVM, this macro was added -// recently. -#ifndef LLVM_EXTENSION -#define LLVM_EXTENSION -#endif - #include "Utility/ARM64_DWARF_Registers.h" using namespace lldb; diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp index 873713fd83739..959b04700b176 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_i386.cpp @@ -19,12 +19,6 @@ #include <memory> -// Support building against older versions of LLVM, this macro was added -// recently. -#ifndef LLVM_EXTENSION -#define LLVM_EXTENSION -#endif - #include "RegisterContextDarwin_i386.h" using namespace lldb; diff --git a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp index 47758ce85eb28..22088a7d6448e 100644 --- a/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp +++ b/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_x86_64.cpp @@ -21,12 +21,6 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Compiler.h" -// Support building against older versions of LLVM, this macro was added -// recently. -#ifndef LLVM_EXTENSION -#define LLVM_EXTENSION -#endif - #include "RegisterContextDarwin_x86_64.h" using namespace lldb; diff --git a/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h b/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h index 4a3b3c73fd6b9..af3027afa73c9 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 diff --git a/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h b/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h index 0d2149c835736..bfdd586d9ded7 100644 --- a/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h +++ b/lldb/source/Plugins/Process/Utility/lldb-x86-register-enums.h @@ -294,7 +294,8 @@ enum { lldb_bndstatus_x86_64, k_last_mpxc_x86_64 = lldb_bndstatus_x86_64, - lldb_dr0_x86_64, + k_first_dbr_x86_64, + lldb_dr0_x86_64 = k_first_dbr_x86_64, lldb_dr1_x86_64, lldb_dr2_x86_64, lldb_dr3_x86_64, @@ -302,6 +303,7 @@ enum { lldb_dr5_x86_64, lldb_dr6_x86_64, lldb_dr7_x86_64, + k_last_dbr_x86_64 = lldb_dr7_x86_64, k_num_registers_x86_64, k_num_gpr_registers_x86_64 = k_last_gpr_x86_64 - k_first_gpr_x86_64 + 1, @@ -312,6 +314,7 @@ enum { k_num_fpr_registers_x86_64 + k_num_avx_registers_x86_64 + k_num_mpx_registers_x86_64, + k_num_dbr_registers_x86_64 = k_last_dbr_x86_64 - k_first_dbr_x86_64 + 1, }; } |
