Age | Commit message (Collapse) | Author |
|
|
|
Used the libc_enum! macro to create enums for the ptrace event, request, and libc_bitflags for options constants defined in libc.
Also, replicated functionality to move from c_int to PtraceEvent enum in PR #728 as it appears to be abandoned.
Added utility function for detaching from tracee. Updated names and removed ptrace::ptrace namespace
|
|
|
|
|
|
|
|
|
|
|
|
These include:
* PTRACE_TRACEME
* PTRACE_CONT
* PTRACE_ATTACH
* PTRACE_SYSCALL
|
|
Unlike in C, we have namespacing in Rust. Renaming the functions allows us to avoid a `use nix::sys::ptrace::*` in favor of `use nix::sys::ptrace` and then calling, for example, `ptrace::traceme()`
|
|
The boxing and unboxing was unnecessary and instead the references to the type on
the stack can just be cast.
|
|
|
|
Nothing that nix currently binds is architecture-specific, and Android
supports ptrace just as much as non-Android Linux.
|
|
|
|
Some ptrace functions return structures through the data argument. This commit adds utilities to return data through this mechanism and function specialisations for a few of these functions (getting event messages or the siginfo_t struct). Once the next version of libc is released these utilities will be expanded to include the fpregs and user_regs structs.
Ptrace requests that are now satisfied by a more specific public function will return an unsupported operation error. This has involved adding an UnsupportedOperation to the nix::Error enum and removed the mapping from Error to Errno and from Error to std::io::Error.
|
|
|
|
|
|
|
|
|
|
|
|
Closes #138
|