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
This commit is contained in:
primiano@chromium.org 2014-10-24 10:58:38 +00:00
parent c1c257f4f6
commit e20758c298
4 changed files with 92 additions and 7 deletions

View file

@ -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);
}

View file

@ -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.