From e20758c2988bf1923d1d2d6cd3e2d2d73c6980cb Mon Sep 17 00:00:00 2001 From: "primiano@chromium.org" Date: Fri, 24 Oct 2014 10:58:38 +0000 Subject: Fix breakpad on mips and x86_64 for the NDK r10c update. This change introduces the necessary glue typedefs to deal with the mismatch introduced by the latest Android NDK (w.r.t. desktop Linux): - [x86_64] Rename fpregs mxcr_mask -> .mxcsr_mask - [mips] uc_mcontext.fpregs.fp_r.fp_dregs -> uc_mcontext.fpreg - [mips] restore the forked user.h Submitting this on behalf of fdegans@chromium.org TBR=mark@chromium.org git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1397 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/linux/dump_writer_common/thread_info.cc | 5 +++++ src/client/linux/dump_writer_common/ucontext_reader.cc | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'src/client/linux') diff --git a/src/client/linux/dump_writer_common/thread_info.cc b/src/client/linux/dump_writer_common/thread_info.cc index 905941ee..f8488366 100644 --- a/src/client/linux/dump_writer_common/thread_info.cc +++ b/src/client/linux/dump_writer_common/thread_info.cc @@ -178,7 +178,12 @@ void ThreadInfo::FillCPUContext(RawContextCPU* out) const { out->flt_save.data_offset = fpregs.rdp; out->flt_save.data_selector = 0; // We don't have this. out->flt_save.mx_csr = fpregs.mxcsr; +#if defined (__ANDROID__) + // Internal bug b/18097559 + out->flt_save.mx_csr_mask = fpregs.mxcsr_mask; +#else out->flt_save.mx_csr_mask = fpregs.mxcr_mask; +#endif my_memcpy(&out->flt_save.float_registers, &fpregs.st_space, 8 * 16); my_memcpy(&out->flt_save.xmm_registers, &fpregs.xmm_space, 16 * 16); } diff --git a/src/client/linux/dump_writer_common/ucontext_reader.cc b/src/client/linux/dump_writer_common/ucontext_reader.cc index f497ac2f..b20a68bf 100644 --- a/src/client/linux/dump_writer_common/ucontext_reader.cc +++ b/src/client/linux/dump_writer_common/ucontext_reader.cc @@ -241,11 +241,7 @@ void UContextReader::FillCPUContext(RawContextCPU *out, const ucontext *uc) { out->cause = 0; // Not reported in signal context. for (int i = 0; i < MD_FLOATINGSAVEAREA_MIPS_FPR_COUNT; ++i) -#if defined (__ANDROID__) - out->float_save.regs[i] = uc->uc_mcontext.fpregs[i]; -#else out->float_save.regs[i] = uc->uc_mcontext.fpregs.fp_r.fp_dregs[i]; -#endif out->float_save.fpcsr = uc->uc_mcontext.fpc_csr; out->float_save.fir = uc->uc_mcontext.fpc_eir; // Unused. -- cgit v1.2.1