summaryrefslogtreecommitdiff
path: root/src/sys
diff options
context:
space:
mode:
authordalance <dalance@gmail.com>2018-04-26 17:44:09 +0900
committerdalance <dalance@gmail.com>2018-04-29 12:31:57 +0900
commit1dda866cfc000bc4cc8390e5ecebd98eaf8c867b (patch)
treeb42b0f0f701c0104d90f8560e0e3d5fa52824033 /src/sys
parentc2fb79e2fd6ecc15589f532459db06a506696efa (diff)
downloadnix-1dda866cfc000bc4cc8390e5ecebd98eaf8c867b.zip
Enabled more ptrace::Request definitions for uncommon Linux platforms
Diffstat (limited to 'src/sys')
-rw-r--r--src/sys/ptrace.rs64
1 files changed, 52 insertions, 12 deletions
diff --git a/src/sys/ptrace.rs b/src/sys/ptrace.rs
index 4fb4f5b5..4bb7e06f 100644
--- a/src/sys/ptrace.rs
+++ b/src/sys/ptrace.rs
@@ -34,36 +34,76 @@ libc_enum!{
PTRACE_CONT,
PTRACE_KILL,
PTRACE_SINGLESTEP,
- #[cfg(all(any(target_env = "musl", target_arch ="x86_64", target_arch = "s390x"), not(target_os = "android")))]
+ #[cfg(any(all(target_os = "android", target_pointer_width = "32"),
+ all(target_os = "linux", any(target_env = "musl",
+ target_arch = "mips",
+ target_arch = "mips64",
+ target_arch = "s390x",
+ target_arch = "x86_64",
+ target_pointer_width = "32"))))]
PTRACE_GETREGS,
- #[cfg(all(any(target_env = "musl", target_arch ="x86_64", target_arch = "s390x"), not(target_os = "android")))]
+ #[cfg(any(all(target_os = "android", target_pointer_width = "32"),
+ all(target_os = "linux", any(target_env = "musl",
+ target_arch = "mips",
+ target_arch = "mips64",
+ target_arch = "s390x",
+ target_arch = "x86_64",
+ target_pointer_width = "32"))))]
PTRACE_SETREGS,
- #[cfg(all(any(target_env = "musl", target_arch ="x86_64", target_arch = "s390x"), not(target_os = "android")))]
+ #[cfg(any(all(target_os = "android", target_pointer_width = "32"),
+ all(target_os = "linux", any(target_env = "musl",
+ target_arch = "mips",
+ target_arch = "mips64",
+ target_arch = "s390x",
+ target_arch = "x86_64",
+ target_pointer_width = "32"))))]
PTRACE_GETFPREGS,
- #[cfg(all(any(target_env = "musl", target_arch ="x86_64", target_arch = "s390x"), not(target_os = "android")))]
+ #[cfg(any(all(target_os = "android", target_pointer_width = "32"),
+ all(target_os = "linux", any(target_env = "musl",
+ target_arch = "mips",
+ target_arch = "mips64",
+ target_arch = "s390x",
+ target_arch = "x86_64",
+ target_pointer_width = "32"))))]
PTRACE_SETFPREGS,
PTRACE_ATTACH,
PTRACE_DETACH,
- #[cfg(all(any(target_env = "musl", target_arch ="x86_64"), not(target_os = "android")))]
+ #[cfg(all(target_os = "linux", any(target_env = "musl",
+ target_arch = "mips",
+ target_arch = "mips64",
+ target_arch = "arm",
+ target_arch = "x86",
+ target_arch = "x86_64")))]
PTRACE_GETFPXREGS,
- #[cfg(all(any(target_env = "musl", target_arch ="x86_64"), not(target_os = "android")))]
+ #[cfg(all(target_os = "linux", any(target_env = "musl",
+ target_arch = "mips",
+ target_arch = "mips64",
+ target_arch = "arm",
+ target_arch = "x86",
+ target_arch = "x86_64")))]
PTRACE_SETFPXREGS,
PTRACE_SYSCALL,
PTRACE_SETOPTIONS,
PTRACE_GETEVENTMSG,
PTRACE_GETSIGINFO,
PTRACE_SETSIGINFO,
- #[cfg(all(any(target_env = "musl", target_arch ="x86_64", target_arch = "s390x"), not(target_os = "android")))]
+ #[cfg(all(target_os = "linux", not(any(target_arch = "mips",
+ target_arch = "mips64"))))]
PTRACE_GETREGSET,
- #[cfg(all(any(target_env = "musl", target_arch ="x86_64", target_arch = "s390x"), not(target_os = "android")))]
+ #[cfg(all(target_os = "linux", not(any(target_arch = "mips",
+ target_arch = "mips64"))))]
PTRACE_SETREGSET,
- #[cfg(not(any(target_os = "android", target_arch = "mips", target_arch = "mips64")))]
+ #[cfg(all(target_os = "linux", not(any(target_arch = "mips",
+ target_arch = "mips64"))))]
PTRACE_SEIZE,
- #[cfg(not(any(target_os = "android", target_arch = "mips", target_arch = "mips64")))]
+ #[cfg(all(target_os = "linux", not(any(target_arch = "mips",
+ target_arch = "mips64"))))]
PTRACE_INTERRUPT,
- #[cfg(not(any(target_os = "android", target_arch = "mips", target_arch = "mips64")))]
+ #[cfg(all(target_os = "linux", not(any(target_arch = "mips",
+ target_arch = "mips64"))))]
PTRACE_LISTEN,
- #[cfg(not(any(target_os = "android", target_arch = "mips", target_arch = "mips64")))]
+ #[cfg(all(target_os = "linux", not(any(target_arch = "mips",
+ target_arch = "mips64"))))]
PTRACE_PEEKSIGINFO,
}
}