aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Budorick <jbudorick@chromium.org>2017-05-25 07:02:43 -0700
committerMike Frysinger <vapier@chromium.org>2017-05-25 14:44:22 +0000
commitdc3ba60f0f7e99f603565ff82ee10a5e2c23476b (patch)
tree71096d3f0d717e09c42faabdf4558faacebd1a45
parentSimplify ELF parser code. (diff)
downloadbreakpad-dc3ba60f0f7e99f603565ff82ee10a5e2c23476b.tar.xz
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>
-rw-r--r--src/client/linux/minidump_writer/linux_ptrace_dumper.cc6
1 files changed, 5 insertions, 1 deletions
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.