linux-ptrace-0.1.2: Wrapping of Linux' ptrace(2).



Sadly, only the OS thread which performed the ptrace_attach is allowed to mess with the traced process. This means that users of this module will need to forkOS or runInBoundThread in order to get reliable behaviour.



ptrace_traceme :: IO ()Source

Invoke the ptrace system call with various arguments.

Perform one of the PTRACE_PEEK* operations.

Perform one of the PTRACE_POKE* operations.

Perform one of the PTRACE_GET* operations.

Perform one of the PTRACE_SET* operations.

Resume a traced process.

Attach the parent process to this process.

ptrace_attach :: CPid -> IO ()Source

Attach to a process. FIXME: handle EPERM. return IO Bool?

ptrace_peekdata :: CPid -> RemotePtr Word -> IO WordSource

Read a word from the traced process.

ptrace_pokedata :: CPid -> RemotePtr Word -> Word -> IO ()Source

Write a word to the traced process.

ptrace_syscall :: CPid -> Maybe Signal -> IO ()Source

Continue the traced process, possibly with a signal.

ptrace_kill :: CPid -> IO ()Source

Send the traced process a SIGKILL.

ptrace_setoptions :: CPid -> [Option] -> IO ()Source