summaryrefslogtreecommitdiff
path: root/source/Plugins/Process/Linux/Procfs.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-01-06 20:12:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-01-06 20:12:03 +0000
commit9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc (patch)
treedd2a1ddf0476664c2b823409c36cbccd52662ca7 /source/Plugins/Process/Linux/Procfs.h
parent3bd2e91faeb9eeec1aae82c64a3253afff551cfd (diff)
Notes
Diffstat (limited to 'source/Plugins/Process/Linux/Procfs.h')
-rw-r--r--source/Plugins/Process/Linux/Procfs.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/source/Plugins/Process/Linux/Procfs.h b/source/Plugins/Process/Linux/Procfs.h
new file mode 100644
index 0000000000000..cad433fb095db
--- /dev/null
+++ b/source/Plugins/Process/Linux/Procfs.h
@@ -0,0 +1,31 @@
+//===-- Procfs.h ---------------------------------------------- -*- C++ -*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+// source/Plugins/Process/Linux/Procfs.h defines the symbols we need from
+// sys/procfs.h on Android/Linux for all supported architectures.
+
+#include <sys/ptrace.h>
+
+#ifdef __ANDROID__
+#if defined (__arm64__) || defined (__aarch64__)
+typedef unsigned long elf_greg_t;
+typedef elf_greg_t elf_gregset_t[(sizeof (struct user_pt_regs) / sizeof(elf_greg_t))];
+typedef struct user_fpsimd_state elf_fpregset_t;
+#ifndef NT_FPREGSET
+ #define NT_FPREGSET NT_PRFPREG
+#endif // NT_FPREGSET
+#elif defined (__mips__)
+#ifndef NT_FPREGSET
+ #define NT_FPREGSET NT_PRFPREG
+#endif // NT_FPREGSET
+#endif
+#else // __ANDROID__
+#include <sys/procfs.h>
+#endif // __ANDROID__
+