From 1dda866cfc000bc4cc8390e5ecebd98eaf8c867b Mon Sep 17 00:00:00 2001 From: dalance Date: Thu, 26 Apr 2018 17:44:09 +0900 Subject: Enabled more ptrace::Request definitions for uncommon Linux platforms --- src/sys/ptrace.rs | 64 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 12 deletions(-) (limited to 'src/sys') 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, } } -- cgit v1.2.3