ptrace.rs 839 B

123456789101112131415161718192021222324252627
  1. //! Note: This module is not going to be clean. We're not going to be
  2. //! able to follow the specs 100%. Linux ptrace is very, very,
  3. //! different to Redox. Many people agree that Linux ptrace is bad, so
  4. //! we are NOT going to bend our API for the sake of
  5. //! compatibility. So, this module will be a hellhole.
  6. use super::super::types::*;
  7. use super::super::PalPtrace;
  8. use super::{e, Sys};
  9. use crate::sync::{Mutex, Once};
  10. use alloc::collections::BTreeMap;
  11. #[derive(Default)]
  12. struct State {}
  13. static STATE: Once<Mutex<State>> = Once::new();
  14. fn state() -> &'static Mutex<State> {
  15. STATE.call_once(|| Mutex::new(State::default()))
  16. }
  17. impl PalPtrace for Sys {
  18. fn ptrace(request: c_int, pid: pid_t, addr: *mut c_void, data: *mut c_void) -> c_int {
  19. // Oh boy, this is not gonna be fun.........
  20. unimplemented!()
  21. }
  22. }