summaryrefslogtreecommitdiff
path: root/arch/i386/bits
diff options
context:
space:
mode:
authorSzabolcs Nagy <nsz@port70.net>2018-07-08 15:16:54 +0200
committerRich Felker <dalias@aerifal.cx>2018-07-17 22:25:08 -0400
commitdf6d9450ea19fd71e52cf5cdb4c85beb73066394 (patch)
tree34c80d0c750ec97ce092b1fb0cdf7251f133d16e /arch/i386/bits
parent7ea32a8282b743bb1637b9e1da5f76dcd472a704 (diff)
downloadmusl-df6d9450ea19fd71e52cf5cdb4c85beb73066394.tar.gz
musl-df6d9450ea19fd71e52cf5cdb4c85beb73066394.tar.bz2
musl-df6d9450ea19fd71e52cf5cdb4c85beb73066394.tar.xz
musl-df6d9450ea19fd71e52cf5cdb4c85beb73066394.zip
add support for arch-specific ptrace command macros
sys/ptrace.h is target specific, use bits/ptrace.h to add target specific macro definitions. these macros are kept in the generic sys/ptrace.h even though some targets don't support them: PTRACE_GETREGS PTRACE_SETREGS PTRACE_GETFPREGS PTRACE_SETFPREGS PTRACE_GETFPXREGS PTRACE_SETFPXREGS so no macro definition got removed in this patch on any target. only s390x has a numerically conflicting macro definition (PTRACE_SINGLEBLOCK). the PT_ aliases follow glibc headers, otherwise the definitions come from linux uapi headers except ones that are skipped in glibc and there is no real kernel support (s390x PTRACE_*_AREA) or need special type definitions (mips PTRACE_*_WATCH_*) or only relevant for linux 2.4 compatibility (PTRACE_OLDSETOPTIONS).
Diffstat (limited to 'arch/i386/bits')
-rw-r--r--arch/i386/bits/ptrace.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/i386/bits/ptrace.h b/arch/i386/bits/ptrace.h
new file mode 100644
index 00000000..7d0efbf3
--- /dev/null
+++ b/arch/i386/bits/ptrace.h
@@ -0,0 +1,11 @@
+#define PTRACE_GET_THREAD_AREA 25
+#define PTRACE_SET_THREAD_AREA 26
+#define PTRACE_SYSEMU 31
+#define PTRACE_SYSEMU_SINGLESTEP 32
+#define PTRACE_SINGLEBLOCK 33
+
+#define PT_GET_THREAD_AREA PTRACE_GET_THREAD_AREA
+#define PT_SET_THREAD_AREA PTRACE_SET_THREAD_AREA
+#define PT_SYSEMU PTRACE_SYSEMU
+#define PT_SYSEMU_SINGLESTEP PTRACE_SYSEMU_SINGLESTEP
+#define PT_STEPBLOCK PTRACE_SINGLEBLOCK