[LLDB] Fix LinuxPTraceDefines_arm64sve.h for AArch64 Linux host

LinuxPTraceDefines_arm64sve.h defines essential macros for manipulating
AArch64 SVE core dump registers. Add guard for aarch64/Linux hosts where
newer versions of ptrace.h or sigcontext.h might already define SVE macros.

Differential Revision: https://reviews.llvm.org/D83541
This commit is contained in:
Muhammad Omair Javaid 2020-07-21 14:02:06 +05:00
parent 4470b8c6a6
commit 6960e39eff
1 changed files with 7 additions and 0 deletions

View File

@ -9,6 +9,11 @@
#ifndef LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LINUXPTRACEDEFINES_ARM64SVE_H
#define LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LINUXPTRACEDEFINES_ARM64SVE_H
// LinuxPTraceDefines_arm64sve.h defines essential macros for manipulating
// AArch64 SVE core dump registers. Add guard for aarch64/Linux hosts where
// newer versions of ptrace.h or sigcontext.h might already define SVE macros.
#ifndef SVE_SIG_REGS_OFFSET
#include <stdint.h>
struct _aarch64_context {
@ -257,4 +262,6 @@ struct user_sve_header {
? SVE_PT_SVE_OFFSET + SVE_PT_SVE_SIZE(vq, flags) \
: SVE_PT_FPSIMD_OFFSET + SVE_PT_FPSIMD_SIZE(vq, flags))
#endif // SVE_SIG_REGS_OFFSET
#endif // LLDB_SOURCE_PLUGINS_PROCESS_UTILITY_LINUXPTRACEDEFINES_ARM64SVE_H