aboutsummaryrefslogtreecommitdiff
path: root/src/common/android
diff options
context:
space:
mode:
authorrmcilroy@chromium.org <rmcilroy@chromium.org>2015-04-21 21:34:14 +0000
committerrmcilroy@chromium.org <rmcilroy@chromium.org>2015-04-21 21:34:14 +0000
commit0f27af628fd9aff70193abb140038e2d8f938165 (patch)
tree2bf0f466b6b320fb93975d3aff953c90608a5493 /src/common/android
parentupdate svn:ignores (diff)
downloadbreakpad-0f27af628fd9aff70193abb140038e2d8f938165.tar.xz
[MIPS]: Use mcontext_t structure for MIPS
This change removes user_regs_struct and user_fpregs_struct structures for mips and uses mcontext_t instead. R=fdegans@chromium.org, mark@chromium.org, rmcilroy@chromium.org Review URL: https://breakpad.appspot.com/3744002 Patch from Gordana Cmiljanovic <Gordana.Cmiljanovic@imgtec.com>. git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1452 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common/android')
-rw-r--r--src/common/android/include/sys/procfs.h3
-rw-r--r--src/common/android/include/sys/user.h78
2 files changed, 3 insertions, 78 deletions
diff --git a/src/common/android/include/sys/procfs.h b/src/common/android/include/sys/procfs.h
index bedae34a..27223ea3 100644
--- a/src/common/android/include/sys/procfs.h
+++ b/src/common/android/include/sys/procfs.h
@@ -38,6 +38,9 @@
#include <asm/ptrace.h>
#include <sys/cdefs.h>
+#if defined (__mips__)
+#include <sys/types.h>
+#endif
#include <sys/user.h>
#include <unistd.h>
diff --git a/src/common/android/include/sys/user.h b/src/common/android/include/sys/user.h
index 05b22ced..24a0243a 100644
--- a/src/common/android/include/sys/user.h
+++ b/src/common/android/include/sys/user.h
@@ -33,88 +33,12 @@
// The purpose of this file is to glue the mismatching headers (Android NDK vs
// glibc) and therefore avoid doing otherwise awkward #ifdefs in the code.
// The following quirks are currently handled by this file:
-// - MIPS: Keep using forked definitions of user.h structs. The definition in
-// the NDK is completely different. Internal bug b/18097715
// - i386: Use the Android NDK but alias user_fxsr_struct > user_fpxregs_struct.
// - x86_64: Override a typo in user_fpregs_struct (mxcsr_mask -> mxcr_mask).
// The typo has been fixed in NDK r10d, but a preprocessor workaround is
// required to make breakpad build with r10c and lower (more details below).
// - Other platforms: Just use the Android NDK unchanged.
-#ifdef __mips__
-#ifdef __cplusplus
-extern "C" {
-#endif // __cplusplus
-
-#define EF_REG0 6
-#define EF_REG1 7
-#define EF_REG2 8
-#define EF_REG3 9
-#define EF_REG4 10
-#define EF_REG5 11
-#define EF_REG6 12
-#define EF_REG7 13
-#define EF_REG8 14
-#define EF_REG9 15
-#define EF_REG10 16
-#define EF_REG11 17
-#define EF_REG12 18
-#define EF_REG13 19
-#define EF_REG14 20
-#define EF_REG15 21
-#define EF_REG16 22
-#define EF_REG17 23
-#define EF_REG18 24
-#define EF_REG19 25
-#define EF_REG20 26
-#define EF_REG21 27
-#define EF_REG22 28
-#define EF_REG23 29
-#define EF_REG24 30
-#define EF_REG25 31
-
-/*
- * k0/k1 unsaved
- */
-#define EF_REG26 32
-#define EF_REG27 33
-#define EF_REG28 34
-#define EF_REG29 35
-#define EF_REG30 36
-#define EF_REG31 37
-
-/*
- * Saved special registers
- */
-#define EF_LO 38
-#define EF_HI 39
-#define EF_CP0_EPC 40
-#define EF_CP0_BADVADDR 41
-#define EF_CP0_STATUS 42
-#define EF_CP0_CAUSE 43
-
-struct user_regs_struct {
- unsigned long long regs[32];
- unsigned long long lo;
- unsigned long long hi;
- unsigned long long epc;
- unsigned long long badvaddr;
- unsigned long long status;
- unsigned long long cause;
-};
-
-struct user_fpregs_struct {
- unsigned long long regs[32];
- unsigned int fpcsr;
- unsigned int fir;
-};
-
-#ifdef __cplusplus
-} // extern "C"
-#endif // __cplusplus
-
-#else // __mips__
-
// TODO(primiano): remove this after Chromium has stably rolled to NDK r10d.
// Historical context: NDK releases < r10d had a typo in sys/user.h (mxcsr_mask
// instead of mxcr_mask), which is fixed in r10d. However, just switching to use
@@ -143,6 +67,4 @@ typedef struct user_fxsr_struct user_fpxregs_struct;
#endif // __cplusplus
#endif // __i386__
-#endif // __mips__
-
#endif // GOOGLE_BREAKPAD_COMMON_ANDROID_INCLUDE_SYS_USER_H