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.
- data RemotePtr a
- castRemotePtr :: RemotePtr t -> RemotePtr a
- ptrace_traceme :: IO ()
- ptrace_attach :: CPid -> IO ()
- ptrace_peektext :: CPid -> RemotePtr Word -> IO Word
- ptrace_peekdata :: CPid -> RemotePtr Word -> IO Word
- ptrace_peekuser :: CPid -> RemotePtr Word -> IO Word
- ptrace_poketext :: CPid -> RemotePtr Word -> Word -> IO ()
- ptrace_pokedata :: CPid -> RemotePtr Word -> Word -> IO ()
- ptrace_pokeuser :: CPid -> RemotePtr Word -> Word -> IO ()
- ptrace_cont :: CPid -> Maybe Signal -> IO ()
- ptrace_syscall :: CPid -> Maybe Signal -> IO ()
- ptrace_singlestep :: CPid -> Maybe Signal -> IO ()
- ptrace_detach :: CPid -> Maybe Signal -> IO ()
- ptrace_kill :: CPid -> IO ()
- ptrace_getregs :: CPid -> IO Regs
- ptrace_setregs :: CPid -> Regs -> IO ()
- ptrace_setoptions :: CPid -> [Option] -> IO ()
- ptrace_geteventmsg :: CPid -> IO CULong
Documentation
castRemotePtr :: RemotePtr t -> RemotePtr aSource
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_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_getregs :: CPid -> IO RegsSource
ptrace_setoptions :: CPid -> [Option] -> IO ()Source
ptrace_geteventmsg :: CPid -> IO CULongSource