|
@@ -1,8 +1,10 @@
|
|
|
//! ptrace compatibility layer for Redox OS
|
|
|
|
|
|
+use core::ffi::VaList;
|
|
|
use platform::types::*;
|
|
|
use platform::{PalPtrace, Sys};
|
|
|
|
|
|
+pub const PTRACE_TRACEME: c_int = 0;
|
|
|
pub const PTRACE_PEEKTEXT: c_int = 1;
|
|
|
pub const PTRACE_PEEKDATA: c_int = 2;
|
|
|
pub const PTRACE_POKETEXT: c_int = 4;
|
|
@@ -16,9 +18,11 @@ pub const PTRACE_GETFPREGS: c_int = 14;
|
|
|
pub const PTRACE_SETFPREGS: c_int = 15;
|
|
|
pub const PTRACE_ATTACH: c_int = 16;
|
|
|
pub const PTRACE_DETACH: c_int = 17;
|
|
|
+pub const PTRACE_SYSCALL: c_int = 24;
|
|
|
|
|
|
+// Can't use "params: ..." syntax, because... guess what? Cbingen again :(
|
|
|
#[no_mangle]
|
|
|
-pub unsafe extern "C" fn ptrace(request: c_int, mut params: ...) -> c_int {
|
|
|
+pub unsafe extern "C" fn sys_ptrace(request: c_int, mut params: VaList) -> c_int {
|
|
|
// Musl also just grabs the arguments from the varargs...
|
|
|
Sys::ptrace(request, params.arg(), params.arg(), params.arg())
|
|
|
}
|