frysk.sys.ptrace
Class Ptrace

java.lang.Object
  extended by frysk.sys.ptrace.Ptrace

public class Ptrace
extends Object

Trace a process.


Field Summary
static long OPTION_CLONE
          Return the bitmask for enabling clone tracing.
static long OPTION_EXEC
          Return the bitmask for enabling exec tracing.
static long OPTION_EXIT
          Return the bitmask for enabling exit tracing.
static long OPTION_FORK
          Return the bitmask for enabling fork tracing.
static long OPTION_SYSGOOD
          Return the bitmask for enabling SYSGOOD(?} tracing.
 
Constructor Summary
Ptrace()
           
 
Method Summary
static void attach(ProcessIdentifier pid)
          Attach to the process specified by PID.
static void cont(ProcessIdentifier pid, Signal signal)
          Continue the process specified by PID, if SIG is non-zero, deliver the signal.
static void detach(ProcessIdentifier pid, Signal signal)
          Detach from the process specified by PID.
static long getEventMsg(ProcessIdentifier pid)
          Fetch the auxilary information associated with PID's last WAIT event.
static void setOptions(ProcessIdentifier pid, long options)
          Set PID's trace options.
static void singleStep(ProcessIdentifier pid, Signal signal)
          Single-step (instruction step) the process specified by PID, if SIG is non-zero, deliver the signal.
static void sysCall(ProcessIdentifier pid, Signal signal)
          Continue the process specified by PID, stopping when there is a system-call; if SIG is non-zero deliver the signal.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OPTION_CLONE

public static final long OPTION_CLONE
Return the bitmask for enabling clone tracing.


OPTION_FORK

public static final long OPTION_FORK
Return the bitmask for enabling fork tracing.


OPTION_EXIT

public static final long OPTION_EXIT
Return the bitmask for enabling exit tracing.


OPTION_SYSGOOD

public static final long OPTION_SYSGOOD
Return the bitmask for enabling SYSGOOD(?} tracing.


OPTION_EXEC

public static final long OPTION_EXEC
Return the bitmask for enabling exec tracing.

Constructor Detail

Ptrace

public Ptrace()
Method Detail

attach

public static void attach(ProcessIdentifier pid)
Attach to the process specified by PID.


detach

public static void detach(ProcessIdentifier pid,
                          Signal signal)
Detach from the process specified by PID.


singleStep

public static void singleStep(ProcessIdentifier pid,
                              Signal signal)
Single-step (instruction step) the process specified by PID, if SIG is non-zero, deliver the signal.


cont

public static void cont(ProcessIdentifier pid,
                        Signal signal)
Continue the process specified by PID, if SIG is non-zero, deliver the signal.


sysCall

public static void sysCall(ProcessIdentifier pid,
                           Signal signal)
Continue the process specified by PID, stopping when there is a system-call; if SIG is non-zero deliver the signal.


getEventMsg

public static long getEventMsg(ProcessIdentifier pid)
Fetch the auxilary information associated with PID's last WAIT event.


setOptions

public static void setOptions(ProcessIdentifier pid,
                              long options)
Set PID's trace options. OPTIONS is formed by or'ing the values returned by the option* methods below.