mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 09:35:34 +00:00
Don't attempt to use PTRACE_GETREGS if it isn't defined.
Follow up to https://chromium-review.googlesource.com/c/484479/, which does not compile on arm64. Bug: chromium:725754 Change-Id: Iaa6fbc332564909a10e2602a1026c14fb25625f4 Reviewed-on: https://chromium-review.googlesource.com/515044 Reviewed-by: Mark Mentovai <mark@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
parent
fbfd41af5f
commit
dc3ba60f0f
|
@ -169,6 +169,7 @@ bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid)
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LinuxPtraceDumper::ReadRegisters(ThreadInfo* info, pid_t tid) {
|
bool LinuxPtraceDumper::ReadRegisters(ThreadInfo* info, pid_t tid) {
|
||||||
|
#ifdef PTRACE_GETREGS
|
||||||
void* gp_addr;
|
void* gp_addr;
|
||||||
info->GetGeneralPurposeRegisters(&gp_addr, NULL);
|
info->GetGeneralPurposeRegisters(&gp_addr, NULL);
|
||||||
if (sys_ptrace(PTRACE_GETREGS, tid, NULL, gp_addr) == -1) {
|
if (sys_ptrace(PTRACE_GETREGS, tid, NULL, gp_addr) == -1) {
|
||||||
|
@ -185,8 +186,11 @@ bool LinuxPtraceDumper::ReadRegisters(ThreadInfo* info, pid_t tid) {
|
||||||
if (sys_ptrace(PTRACE_GETFPREGS, tid, NULL, fp_addr) == -1) {
|
if (sys_ptrace(PTRACE_GETFPREGS, tid, NULL, fp_addr) == -1) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // !(defined(__ANDROID__) && defined(__ARM_EABI__))
|
||||||
return true;
|
return true;
|
||||||
|
#else // PTRACE_GETREGS
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read thread info from /proc/$pid/status.
|
// Read thread info from /proc/$pid/status.
|
||||||
|
|
Loading…
Reference in a new issue