aboutsummaryrefslogtreecommitdiff
path: root/src/common/android/include/sys
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/android/include/sys')
-rw-r--r--src/common/android/include/sys/procfs.h4
-rw-r--r--src/common/android/include/sys/ucontext.h13
-rw-r--r--src/common/android/include/sys/user.h5
3 files changed, 21 insertions, 1 deletions
diff --git a/src/common/android/include/sys/procfs.h b/src/common/android/include/sys/procfs.h
index 9cfdd01c..ec65b91c 100644
--- a/src/common/android/include/sys/procfs.h
+++ b/src/common/android/include/sys/procfs.h
@@ -44,7 +44,7 @@
extern "C" {
#endif // __cplusplus
-#ifdef __x86_64__
+#if defined(__x86_64__) || defined(__aarch64__)
typedef unsigned long long elf_greg_t;
#else
typedef unsigned long elf_greg_t;
@@ -52,6 +52,8 @@ typedef unsigned long elf_greg_t;
#ifdef __arm__
#define ELF_NGREG (sizeof(struct user_regs) / sizeof(elf_greg_t))
+#elif defined(__aarch64__)
+#define ELF_NGREG (sizeof(struct user_pt_regs) / sizeof(elf_greg_t))
#else
#define ELF_NGREG (sizeof(struct user_regs_struct) / sizeof(elf_greg_t))
#endif
diff --git a/src/common/android/include/sys/ucontext.h b/src/common/android/include/sys/ucontext.h
index 85c69ebd..8bd5877f 100644
--- a/src/common/android/include/sys/ucontext.h
+++ b/src/common/android/include/sys/ucontext.h
@@ -62,6 +62,19 @@ typedef struct ucontext {
// Other fields are not used by Google Breakpad. Don't define them.
} ucontext_t;
+#elif defined(__aarch64__)
+
+#include <asm/sigcontext.h>
+typedef struct sigcontext mcontext_t;
+
+typedef struct ucontext {
+ unsigned long uc_flags;
+ struct ucontext *uc_link;
+ stack_t uc_stack;
+ sigset_t uc_sigmask;
+ mcontext_t uc_mcontext;
+} ucontext_t;
+
#elif defined(__i386__)
/* 80-bit floating-point register */
diff --git a/src/common/android/include/sys/user.h b/src/common/android/include/sys/user.h
index bc275bbe..257cd803 100644
--- a/src/common/android/include/sys/user.h
+++ b/src/common/android/include/sys/user.h
@@ -75,6 +75,11 @@ struct user_vfpregs {
unsigned long fpscr;
};
+#elif defined(__aarch64__)
+
+// aarch64 does not have user_regs definitions in <asm/user.h>, instead
+// use the definitions in <asm/ptrace.h>, which we don't need to redefine here.
+
#elif defined(__i386__)
#define _I386_USER_H 1 // Prevent <asm/user.h> conflicts