mirror of
https://git.suyu.dev/suyu/breakpad.git
synced 2025-12-28 18:25:20 +01:00
[MIPS] Fix core dump related unit tests for Android on MIPS
This change fixes failing unittests in Android on MIPS: LinuxCoreDumperTest.VerifyDumpWithMultipleThreads ElfCoreDumpTest.ValidCoreFile BUG=None TEST=Running breakpad_unittests on MIPS Android device Review URL: https://breakpad.appspot.com/3664002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1330 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
9eb13afd54
commit
412b68396c
3 changed files with 65 additions and 0 deletions
|
|
@ -188,7 +188,19 @@ bool LinuxCoreDumper::EnumerateThreads() {
|
|||
memset(&info, 0, sizeof(ThreadInfo));
|
||||
info.tgid = status->pr_pgrp;
|
||||
info.ppid = status->pr_ppid;
|
||||
#if defined(__mips__)
|
||||
for (int i = EF_REG0; i <= EF_REG31; i++)
|
||||
info.regs.regs[i - EF_REG0] = status->pr_reg[i];
|
||||
|
||||
info.regs.lo = status->pr_reg[EF_LO];
|
||||
info.regs.hi = status->pr_reg[EF_HI];
|
||||
info.regs.epc = status->pr_reg[EF_CP0_EPC];
|
||||
info.regs.badvaddr = status->pr_reg[EF_CP0_BADVADDR];
|
||||
info.regs.status = status->pr_reg[EF_CP0_STATUS];
|
||||
info.regs.cause = status->pr_reg[EF_CP0_CAUSE];
|
||||
#else
|
||||
memcpy(&info.regs, status->pr_reg, sizeof(info.regs));
|
||||
#endif
|
||||
if (first_thread) {
|
||||
crash_thread_ = pid;
|
||||
crash_signal_ = status->pr_info.si_signo;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue