< prev index next >

agent/src/os/linux/ps_proc.c

Print this page
rev 8073 : 8078521: AARCH64: Add AArch64 SA support
Reviewed-by: kvn

*** 36,45 **** --- 36,50 ---- #if defined(x86_64) && !defined(amd64) #define amd64 1 #endif + #ifdef aarch64 + #include <sys/uio.h> // For struct iovec + #include <elf.h> + #endif + #ifndef __WALL #define __WALL 0x40000000 // Copied from /usr/include/linux/wait.h #endif // This file has the libproc implementation specific to live process
*** 147,156 **** --- 152,172 ---- if (ptrace(PTRACE_GETREGSET, pid, NT_PRSTATUS, (void*) &iov) < 0) { print_debug("ptrace(PTRACE_GETREGSET, ...) failed for lwp %d\n", pid); return false; } return true; + #elif defined(aarch64) + { + struct iovec iovec; + iovec.iov_base = user; + iovec.iov_len = sizeof (struct user_regs_struct); + if (ptrace(PTRACE_GETREGSET, pid, NT_PRSTATUS, &iovec) < 0) { + print_debug("ptrace(PTRACE_GETREGSET, ...) failed for lwp %d\n", pid); + return false; + } + return true; + } #else print_debug("ptrace(PTRACE_GETREGS, ...) not supported\n"); return false; #endif
< prev index next >