From dc3ba60f0f7e99f603565ff82ee10a5e2c23476b Mon Sep 17 00:00:00 2001 From: John Budorick Date: Thu, 25 May 2017 07:02:43 -0700 Subject: 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 Reviewed-by: Mike Frysinger --- src/client/linux/minidump_writer/linux_ptrace_dumper.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/client') diff --git a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc index f181bf92..e3ddb81a 100644 --- a/src/client/linux/minidump_writer/linux_ptrace_dumper.cc +++ b/src/client/linux/minidump_writer/linux_ptrace_dumper.cc @@ -169,6 +169,7 @@ bool LinuxPtraceDumper::ReadRegisterSet(ThreadInfo* info, pid_t tid) } bool LinuxPtraceDumper::ReadRegisters(ThreadInfo* info, pid_t tid) { +#ifdef PTRACE_GETREGS void* gp_addr; info->GetGeneralPurposeRegisters(&gp_addr, NULL); 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) { return false; } -#endif +#endif // !(defined(__ANDROID__) && defined(__ARM_EABI__)) return true; +#else // PTRACE_GETREGS + return false; +#endif } // Read thread info from /proc/$pid/status. -- cgit v1.2.1