Skip to content

Commit

Permalink
arm64 check return value of the ptrace systemcall, not errno
Browse files Browse the repository at this point in the history
  • Loading branch information
Itaru Kitayama committed Dec 16, 2016
1 parent 633389d commit f47d0f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion proccontrol/src/linux.C
Expand Up @@ -2414,7 +2414,11 @@ bool linux_thread::plat_getRegister(Dyninst::MachRegister reg, Dyninst::MachRegi
result = do_ptrace((pt_req) PTRACE_PEEKUSER, lwp, (void *) (unsigned long) offset, NULL);
#endif
//unsigned long result = do_ptrace((pt_req) PTRACE_PEEKUSER, lwp, (void *) (unsigned long) offset, NULL);
if (errno != 0) {
#if defined(arch_aarch64)
if (ret != 0) {
#else
if (result != 0) {
#endif
int error = errno;
perr_printf("Error reading registers from %d: %s\n", lwp, strerror(errno));
//pthrd_printf("ARM-Info: offset(%d-%d)\n", (void *)(unsigned long)offset, offset/8);
Expand Down

0 comments on commit f47d0f6

Please sign in to comment.