summaryrefslogtreecommitdiff
path: root/src/sys/mod.rs
diff options
context:
space:
mode:
authorxd009642 <danielmckenna93@gmail.com>2018-10-06 15:31:33 +0100
committerxd009642 <danielmckenna93@gmail.com>2018-10-21 18:17:48 +0100
commitf1573a7efa8368507d581adeb3bff9bbf5aa0ead (patch)
tree588c18b2f92397d9593ef1726ad7b6b2514952a4 /src/sys/mod.rs
parenteef3a432d57e8f830e05fede6e3099dcb689aa6b (diff)
downloadnix-f1573a7efa8368507d581adeb3bff9bbf5aa0ead.zip
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.
Diffstat (limited to 'src/sys/mod.rs')
-rw-r--r--src/sys/mod.rs8
1 files changed, 7 insertions, 1 deletions
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")]