haskus-system-0.7.0.0: Haskus system programming framework

Safe HaskellNone
LanguageHaskell2010

Haskus.System.Linux.Trace

Description

Process tracing (ptrace)

Synopsis

Documentation

data TraceRequest Source #

Tracing request

Constructors

ReqTraceMe

Indicate that the process making this request should be traced. All signals received by this process can be intercepted by its parent, and its parent can use the other ptrace requests

ReqPeekText

Return the word in the process's text space at address ADDR

ReqPeekData

Return the word in the process's data space at address ADDR

ReqPeekUser

Return the word in the process's user area at offset ADDR

ReqPokeText

Write the word DATA into the process's text space at address ADDR

ReqPokeData

Write the word DATA into the process's data space at address ADDR

ReqPokeUser

Write the word DATA into the process's user area at offset ADDR

ReqContinue

Continue the process

ReqKill

Kill the process

ReqSingleStep

Single step the process. This is not supported on all machines

ReqGetRegisters

Get all general purpose registers used by a processes. This is not supported on all machines

ReqSetRegisters

Set all general purpose registers used by a processes. This is not supported on all machines

ReqGetFPRegisters

Get all floating point registers used by a processes. This is not supported on all machines

ReqSetFPRegisters

Set all floating point registers used by a processes. This is not supported on all machines

ReqAttach

Attach to a process that is already running

ReqDetach

Detach from a process attached to with PTRACE_ATTACH

ReqGetFPXRegisters

Get all extended floating point registers used by a processes. This is not supported on all machines

ReqSetFPXRegisters

Set all extended floating point registers used by a processes. This is not supported on all machines

ReqSyscall

Continue and stop at the next (return from) syscall

ReqSetOptions

Set ptrace filter options

ReqGetLastMessage

Get last ptrace message

ReqGetSignalInfo

Retrieve information about the signal that caused the stop

ReqSetSignalInfo

Set signal information

ReqGetRegister

Get register content

ReqSetRegister

Set register content

ReqSeize

Like PTRACE_ATTACH, but do not force tracee to trap and do not affect signal or group stop state

ReqInterrupt

Trap seized tracee

ReqListen

Wait for next group event

ReqPeekSignals

Retrieve signal information

data TraceOption Source #

Tracing options

Constructors

OptFlagSyscallTrap

When delivering system call traps set bit 7 in the signal number

OptTraceFork

Stop the tracee at the next fork and automatically start tracing the newly forked process

OptTraceVFork

Stop the tracee at the next fork and automatically start tracing the newly vforked process

OptTraceClone

Stop the tracee at the next fork and automatically start tracing the newly cloned process

OptTraceExec

Stop the tracee at the next execve

OptTraceVForkDone

Stop the tracee at the completion of the next vfork

OptTraceExit

Stop the tracee at exit

OptTraceSecComp

Stop the tracee when a seccomp SECCOMP_RET_TRACE rule is triggered

OptTraceExitKill

When set, tracee processes will receive a KILL signal when the tracer process exits

sysTrace :: MonadIO m => TraceRequest -> ProcessID -> Ptr () -> Ptr () -> Flow m '[Int64, ErrorCode] Source #

Trace a process