|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.proc.Proc frysk.proc.live.LiveProc frysk.proc.live.LinuxPtraceProc
public class LinuxPtraceProc
A Linux Proc tracked using PTRACE.
Nested Class Summary | |
---|---|
(package private) class |
LinuxPtraceProc.BreakpointAction
Class describing the action to take on the suspended Task before adding or deleting a Code observer. |
(package private) static class |
LinuxPtraceProc.InstructionAction
Class describing the action to take on the suspended Task before adding or deleting an Instruction observer. |
(package private) class |
LinuxPtraceProc.SyscallAction
Class describing the action to take on the suspended Task before adding or deleting a Syscall observer. |
(package private) class |
LinuxPtraceProc.WatchpointAction
Watchpoint action class. |
Nested classes/interfaces inherited from class frysk.proc.Proc |
---|
Proc.ObservableXXX |
Field Summary | |
---|---|
private Auxv[] |
auxv
|
(package private) BreakpointAddresses |
breakpoints
The addresses on which we have installed breakpoints (with associated Tasks and TaskObserver.Code listeners). |
private String[] |
cmdLine
|
private SysRootFile |
exe
XXX: This is racy - it can miss file renames. |
private static Log |
fine
|
private LinuxPtraceTask |
mainTask
|
private MemoryMap[] |
maps
|
private LinuxPtraceProcState |
newState
|
private Collection |
observations
The set of observations that currently apply to this task. |
private LinuxPtraceProcState |
oldState
The current state of this Proc, during a state transition newState is null. |
private ArrayList |
outOfLineAddresses
|
private boolean |
requestedOutOfLineAddresses
|
private Stat |
stat
|
private HashMap |
tasks
|
protected WatchpointAddresses |
watchpoints
|
Fields inherited from class frysk.proc.live.LiveProc |
---|
pid |
Fields inherited from class frysk.proc.Proc |
---|
observableAttachedXXX, observableDetachedXXX, parent |
Constructor Summary | |
---|---|
LinuxPtraceProc(Host host,
Proc parent,
ProcessIdentifier pid,
Stat stat)
Create a new detached process. |
|
LinuxPtraceProc(Task task,
ProcessIdentifier fork)
Create a new, definitely attached, definitely running fork of Task. |
Method Summary | |
---|---|
(package private) boolean |
addObservation(Object o)
|
(package private) void |
addTask(LinuxPtraceTask task)
|
(package private) void |
doneOutOfLine(long address)
Called by Breakpoint with an address returned by getOutOfLineAddress() to put it back in the pool. |
(package private) Set |
getAllTasks()
|
Auxv[] |
getAuxv()
The Process Auxiliary Vector. |
String[] |
getCmdLine()
Return the Proc's command line argument list |
String |
getCommand()
Return the basename of the program that this process is running. |
SysRootFile |
getExeFile()
Return the SysRoot path of the program that this process is running. |
int |
getGID()
Return the GID of the Proc. |
Task |
getMainTask()
|
MemoryMap[] |
getMaps()
|
(package private) long |
getOutOfLineAddress()
Returns an available address for out of line stepping. |
Stat |
getStat()
If it hasn't already been read, read the stat structure. |
protected String |
getStateFIXME()
Return the current state as a string. |
int |
getUID()
Return the UID of the Proc. |
(package private) void |
handleAddObservation(TaskObservation observation)
(internal) Tell the process to add the specified Observation, attaching the process if necessary. |
(package private) Iterator |
observationsIterator()
|
(package private) int |
observationsSize()
|
private LinuxPtraceProcState |
oldState()
Return the current state while at the same time marking that the state is in flux. |
protected void |
performDetach()
|
(package private) void |
performRemoval()
(Internal) Tell the process that is no longer listed in the system table remove itself. |
(package private) void |
performTaskAttachCompleted(Task theTask)
(Internal) Tell the process that the corresponding task has completed its attach. |
(package private) void |
performTaskDetachCompleted(Task theTask)
(Internal) Tell the process that the corresponding task has completed its detach. |
(package private) void |
performTaskDetachCompleted(Task theTask,
Task theClone)
(Internal) Tell the process that the corresponding task has completed its detach. |
(package private) boolean |
removeObservation(Object o)
|
(package private) void |
removeTask(LinuxPtraceTask task)
|
(package private) void |
requestAddCodeObserver(Task task,
TaskObservable observable,
TaskObserver.Code observer,
long address)
(Internal) Tell the process to add the specified Code Observation, attaching to the process if necessary. |
(package private) void |
requestAddInstructionObserver(Task task,
TaskObservable observable,
TaskObserver.Instruction observer)
(Internal) Tell the process to add the specified Instruction Observation, attaching and/or suspending the process if necessary. |
(package private) void |
requestAddObserver(Task task,
TaskObservable observable,
TaskObserver observer)
(Internal) Tell the process to add the specified Observation, attaching to the process if necessary. |
(package private) void |
requestAddSyscallObserver(Task task,
TaskObservable observable,
TaskObserver observer)
(Internal) Tell the process to add the specified Observation, attaching to the process if necessary. |
(package private) void |
requestAddWatchObserver(Task task,
TaskObservable observable,
TaskObserver.Watch observer,
long address,
int length,
boolean writeOnly)
(Internal) Tell the process to add the specified Watch Observation, attaching to the process if necessary. |
(package private) void |
requestDeleteCodeObserver(Task task,
TaskObservable observable,
TaskObserver.Code observer,
long address)
(Internal) Tell the process to delete the specified Code Observation, detaching from the process if necessary. |
(package private) void |
requestDeleteInstructionObserver(Task task,
TaskObservable observable,
TaskObserver.Instruction observer)
(Internal) Tell the process to delete the specified Instruction Observation, detaching and/or suspending from the process if necessary. |
(package private) void |
requestDeleteObserver(Task task,
TaskObservable observable,
TaskObserver observer)
(Internal) Tell the process to delete the specified Observation, detaching from the process if necessary. |
(package private) void |
requestDeleteSyscallObserver(Task task,
TaskObservable observable,
TaskObserver observer)
(Internal) Tell the process to delete the specified Observation, detaching from the process if necessary. |
(package private) void |
requestDeleteWatchObserver(Task task,
TaskObservable observable,
TaskObserver.Watch observer,
long address,
int length,
boolean writeOnly)
(Internal) Tell the process to delete the specified Watch Observation, detaching from the process if necessary. |
(package private) void |
requestUnblock(TaskObserver observerArg)
|
void |
sendRefresh()
Refresh the Proc. |
Methods inherited from class frysk.proc.Proc |
---|
add, compareTo, getChildren, getHost, getMap, getParent, getPid, getTasks, remove, remove, requestAbandon, requestAbandonAndRunEvent, requestKill, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private static final Log fine
private final HashMap tasks
private LinuxPtraceTask mainTask
private Auxv[] auxv
private MemoryMap[] maps
private String[] cmdLine
private SysRootFile exe
private Stat stat
private LinuxPtraceProcState oldState
private LinuxPtraceProcState newState
protected final WatchpointAddresses watchpoints
private final Collection observations
final BreakpointAddresses breakpoints
private final ArrayList outOfLineAddresses
private boolean requestedOutOfLineAddresses
Constructor Detail |
---|
public LinuxPtraceProc(Host host, Proc parent, ProcessIdentifier pid, Stat stat)
public LinuxPtraceProc(Task task, ProcessIdentifier fork)
Method Detail |
---|
void addTask(LinuxPtraceTask task)
void removeTask(LinuxPtraceTask task)
Set getAllTasks()
public Task getMainTask()
getMainTask
in class Proc
public Auxv[] getAuxv()
Proc
getAuxv
in class Proc
public MemoryMap[] getMaps()
getMaps
in class Proc
public String[] getCmdLine()
Proc
getCmdLine
in class Proc
public int getUID()
Proc
getUID
in class Proc
public int getGID()
Proc
getGID
in class Proc
public SysRootFile getExeFile()
Proc
getExeFile
in class Proc
public Stat getStat()
public String getCommand()
Proc
getCommand
in class Proc
public void sendRefresh()
sendRefresh
in class Proc
protected String getStateFIXME()
getStateFIXME
in class Proc
private LinuxPtraceProcState oldState()
void performRemoval()
void performTaskAttachCompleted(Task theTask)
void performTaskDetachCompleted(Task theTask)
void performTaskDetachCompleted(Task theTask, Task theClone)
protected void performDetach()
performDetach
in class Proc
void handleAddObservation(TaskObservation observation)
void requestAddObserver(Task task, TaskObservable observable, TaskObserver observer)
void requestDeleteObserver(Task task, TaskObservable observable, TaskObserver observer)
void requestAddSyscallObserver(Task task, TaskObservable observable, TaskObserver observer)
void requestDeleteSyscallObserver(Task task, TaskObservable observable, TaskObserver observer)
void requestAddCodeObserver(Task task, TaskObservable observable, TaskObserver.Code observer, long address)
void requestDeleteCodeObserver(Task task, TaskObservable observable, TaskObserver.Code observer, long address)
void requestAddWatchObserver(Task task, TaskObservable observable, TaskObserver.Watch observer, long address, int length, boolean writeOnly)
void requestDeleteWatchObserver(Task task, TaskObservable observable, TaskObserver.Watch observer, long address, int length, boolean writeOnly)
void requestAddInstructionObserver(Task task, TaskObservable observable, TaskObserver.Instruction observer)
void requestDeleteInstructionObserver(Task task, TaskObservable observable, TaskObserver.Instruction observer)
boolean addObservation(Object o)
boolean removeObservation(Object o)
int observationsSize()
Iterator observationsIterator()
void requestUnblock(TaskObserver observerArg)
long getOutOfLineAddress()
void doneOutOfLine(long address)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |