From f1573a7efa8368507d581adeb3bff9bbf5aa0ead Mon Sep 17 00:00:00 2001 From: xd009642 Date: Sat, 6 Oct 2018 15:31:33 +0100 Subject: Added ptrace support for BSDs * Moved ptrace API into it's own module with cfg'ed modules exported for linux/android or BSDs. * Replicated current linux API for BSD * Added API functions to peek and poke memory to avoid needing to replicate deprecated linux API and remaining feature complete * Added helper function for `PTRACE_KILL` requests * Updated tests based on new API changes * Added addition kill calls to `test_ptrace_cont` as inferior death doesn't happen immediately on OSX which caused issues in the tests. --- src/sys/mod.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/sys/mod.rs') diff --git a/src/sys/mod.rs b/src/sys/mod.rs index e6c7880c..72d59649 100644 --- a/src/sys/mod.rs +++ b/src/sys/mod.rs @@ -38,7 +38,13 @@ pub mod mman; pub mod pthread; -#[cfg(any(target_os = "android", target_os = "linux"))] +#[cfg(any(target_os = "android", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "linux", + target_os = "macos", + target_os = "netbsd", + target_os = "openbsd"))] pub mod ptrace; #[cfg(target_os = "linux")] -- cgit v1.2.3