diff options
author | Elliott Hughes <enh@google.com> | 2015-06-16 16:04:35 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2015-06-16 16:59:49 -0700 |
commit | d49850d6abb1b70c34be99a46e383a6a878ae19e (patch) | |
tree | 4624cfeaeee8dc953c53694f3c405e5dad5f7329 /libc/include/sys/ptrace.h | |
parent | 848276051a24266e1eacf2e508692c62d5a6176d (diff) | |
download | android_bionic-d49850d6abb1b70c34be99a46e383a6a878ae19e.tar.gz android_bionic-d49850d6abb1b70c34be99a46e383a6a878ae19e.tar.bz2 android_bionic-d49850d6abb1b70c34be99a46e383a6a878ae19e.zip |
Fixes for building gdbserver (and gdb) out of the box.
Bug: http://b/21695943
Change-Id: Iadb600b2ae619515d7038a4db9bf464ba31adb36
(cherry picked from commit 895241efbba344c1590b76fcada89c48f4743cf2)
Diffstat (limited to 'libc/include/sys/ptrace.h')
-rw-r--r-- | libc/include/sys/ptrace.h | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/libc/include/sys/ptrace.h b/libc/include/sys/ptrace.h index 8bba9fe43..4b881e743 100644 --- a/libc/include/sys/ptrace.h +++ b/libc/include/sys/ptrace.h @@ -34,11 +34,31 @@ __BEGIN_DECLS -/* glibc uses different names from the kernel for these two... */ +/* glibc uses different PTRACE_ names from the kernel for these two... */ #define PTRACE_POKEUSER PTRACE_POKEUSR #define PTRACE_PEEKUSER PTRACE_PEEKUSR -extern long ptrace(int, ...); +/* glibc exports a different set of PT_ names too... */ +#define PT_TRACE_ME PTRACE_TRACEME +#define PT_READ_I PTRACE_PEEKTEXT +#define PT_READ_D PTRACE_PEEKDATA +#define PT_READ_U PTRACE_PEEKUSR +#define PT_WRITE_I PTRACE_POKETEXT +#define PT_WRITE_D PTRACE_POKEDATA +#define PT_WRITE_U PTRACE_POKEUSR +#define PT_CONT PTRACE_CONT +#define PT_KILL PTRACE_KILL +#define PT_STEP PTRACE_SINGLESTEP +#define PT_GETFPREGS PTRACE_GETFPREGS +#define PT_ATTACH PTRACE_ATTACH +#define PT_DETACH PTRACE_DETACH +#define PT_SYSCALL PTRACE_SYSCALL +#define PT_SETOPTIONS PTRACE_SETOPTIONS +#define PT_GETEVENTMSG PTRACE_GETEVENTMSG +#define PT_GETSIGINFO PTRACE_GETSIGINFO +#define PT_SETSIGINFO PTRACE_SETSIGINFO + +long ptrace(int, ...); __END_DECLS |