Module nix::sys::ptrace

source ·
Available on crate feature ptrace only.
Expand description

Provides helpers for making ptrace system calls

Structs§

  • Ptrace options used in conjunction with the PTRACE_SETOPTIONS request. See man ptrace for more details.

Enums§

  • Using the ptrace options the tracer can configure the tracee to stop at certain events. This enum is used to define those events as defined in man ptrace.
  • Ptrace Request enum defining the action to be taken.

Functions§

  • Attach to a running process, as with ptrace(PTRACE_ATTACH, ...)
  • Restart the stopped tracee process, as with ptrace(PTRACE_CONT, ...)
  • Detaches the current running process, as with ptrace(PTRACE_DETACH, ...)
  • Gets a ptrace event as described by ptrace(PTRACE_GETEVENTMSG, ...)
  • Get user registers, as with ptrace(PTRACE_GETREGS, ...)
  • Get siginfo as with ptrace(PTRACE_GETSIGINFO, ...)
  • Stop a tracee, as with ptrace(PTRACE_INTERRUPT, ...)
  • Issues a kill request as with ptrace(PTRACE_KILL, ...)
  • Reads a word from a processes memory at the given address, as with ptrace(PTRACE_PEEKDATA, …)
  • Reads a word from a user area at offset, as with ptrace(PTRACE_PEEKUSER, …). The user struct definition can be found in /usr/include/sys/user.h.
  • Attach to a running process, as with ptrace(PTRACE_SEIZE, ...)
  • Set options, as with ptrace(PTRACE_SETOPTIONS, ...).
  • Set user registers, as with ptrace(PTRACE_SETREGS, ...)
  • Set siginfo as with ptrace(PTRACE_SETSIGINFO, ...)
  • Move the stopped tracee process forward by a single step as with ptrace(PTRACE_SINGLESTEP, ...)
  • Continue execution until the next syscall, as with ptrace(PTRACE_SYSCALL, ...)
  • Continue execution until the next syscall, as with ptrace(PTRACE_SYSEMU, ...)
  • Move the stopped tracee process forward by a single step or stop at the next syscall as with ptrace(PTRACE_SYSEMU_SINGLESTEP, ...)
  • Sets the process as traceable, as with ptrace(PTRACE_TRACEME, ...)
  • Writes a word into the processes memory at the given address, as with ptrace(PTRACE_POKEDATA, …)
  • Writes a word to a user area at offset, as with ptrace(PTRACE_POKEUSER, …). The user struct definition can be found in /usr/include/sys/user.h.

Type Aliases§