aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/handler/exception_handler.cc
diff options
context:
space:
mode:
authorgordana.cmiljanovic@imgtec.com <gordana.cmiljanovic@imgtec.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-09-11 11:37:04 +0000
committergordana.cmiljanovic@imgtec.com <gordana.cmiljanovic@imgtec.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2013-09-11 11:37:04 +0000
commitf78839c15730533fc433c50ea83a3afea835c245 (patch)
tree9b3136dd94e663af23394356679b78467fddd5b7 /src/client/linux/handler/exception_handler.cc
parentFixing minidump_dump to handle nacl dumps. (diff)
downloadbreakpad-f78839c15730533fc433c50ea83a3afea835c245.tar.xz
Adding support for mips.
Support for mips cpu is added to all breakapad targets including unittests. BUG=none TEST=unittests Review URL: https://breakpad.appspot.com/614002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1212 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/handler/exception_handler.cc')
-rw-r--r--src/client/linux/handler/exception_handler.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index 2808fc90..9df720dd 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -396,8 +396,10 @@ bool ExceptionHandler::HandleSignal(int sig, siginfo_t* info, void* uc) {
CrashContext context;
memcpy(&context.siginfo, info, sizeof(siginfo_t));
memcpy(&context.context, uc, sizeof(struct ucontext));
-#if !defined(__ARM_EABI__)
+#if !defined(__ARM_EABI__) && !defined(__mips__)
// FP state is not part of user ABI on ARM Linux.
+ // In case of MIPS Linux FP state is already part of struct ucontext
+ // and 'float_state' is not a member of CrashContext.
struct ucontext *uc_ptr = (struct ucontext*)uc;
if (uc_ptr->uc_mcontext.fpregs) {
memcpy(&context.float_state,
@@ -602,7 +604,7 @@ bool ExceptionHandler::WriteMinidump() {
}
#endif
-#if !defined(__ARM_EABI__)
+#if !defined(__ARM_EABI__) && !defined(__mips__)
// FPU state is not part of ARM EABI ucontext_t.
memcpy(&context.float_state, context.context.uc_mcontext.fpregs,
sizeof(context.float_state));
@@ -621,6 +623,9 @@ bool ExceptionHandler::WriteMinidump() {
#elif defined(__arm__)
context.siginfo.si_addr =
reinterpret_cast<void*>(context.context.uc_mcontext.arm_pc);
+#elif defined(__mips__)
+ context.siginfo.si_addr =
+ reinterpret_cast<void*>(context.context.uc_mcontext.pc);
#else
#error "This code has not been ported to your platform yet."
#endif