|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object frysk.stepping.SteppingEngine
public class SteppingEngine
State machine for thread and process stepping. Provides static methods for manipulating groups of threads by running, blocking, and various types of stepping.
Constructor Summary | |
---|---|
SteppingEngine()
|
|
SteppingEngine(Proc[] procs)
Sets the initial processes for this SteppingEngine. |
|
SteppingEngine(Proc[] procs,
Observer o)
|
Method Summary | |
---|---|
void |
addBlocker(Task task,
TaskObserver observer)
Add a blocker to the list of blockers that the stepping engine must unblock before continuing. |
void |
addBreakpoint(Task task,
Breakpoint bp)
Adds the given Breakpoint on the given Task. |
void |
addObserver(Observer o)
Adds the given Observer to this.steppingObserver's Observer list. |
boolean |
addProc(Proc proc)
Once SteppingEngine is already managing one or more Tasks, appends the given process to the data structures in SteppingEngine. |
void |
blockedByActionPoint(Task task,
TaskObserver to)
Sets the stepping engine on being hit by an action point. |
void |
blockedByActionPoint(Task task,
TaskObserver to,
String message,
PrintWriter writer)
Sets the stepping engine on being hit by an action point. |
void |
cleanTask(Task task)
Clears information out of SteppingEngine data structures which are mapped to the given Task. |
void |
cleanUpBreakPoint(Task task)
|
void |
clear()
Removes all information from all SteppingEngine data structures. |
void |
continueExecution(LinkedList list)
Deletes the blocking observer from each of the incoming tasks, effectively 'running', or continuing, the process. |
void |
continueExecution(Task task)
|
boolean |
continueForStepping(Task task,
boolean unblockStepper)
Unblock a task so that, from the point of view of the stepping engine, execution can continue. |
void |
deleteBreakpoint(Task task,
Breakpoint bp)
Deletes the given Breakpoint from the given Task |
void |
detachProc(Proc proc,
boolean kill)
Detaches all observers and breakpoints from all Tasks of the given Proc. |
void |
executeTasks(LinkedList tasks)
Method to handle am incoming list of tasks to be run, with four cases. |
LinkedList |
getAndClearBlockers(Task task)
Get the list of blocking observers that have notified the stepping engine and clear it. |
LinkedList |
getBlockers(Task task)
Get the list of blocking observers that have notified the stepping engine. |
BreakpointManager |
getBreakpointManager()
|
HashSet |
getRunningTasks()
Returns a Set of tasks currently in an executing state. |
frysk.stepping.SteppingEngine.SteppingObserver |
getSteppingObserver()
Gets the this.steppingObserver currently being used by the SteppingEngine. |
Breakpoint |
getTaskBreakpoint(Task task)
Returns the Breakpoint set on the given Task |
State |
getTaskState(Task task)
Get the state of a particular Task. |
boolean |
isProcRunning(LinkedList tasks)
Iterates through the given list of Tasks and returns true if any have a non-stopped state. |
boolean |
isTaskRunning(Task task)
Checks to see if the state of the given task is not a stopped state. |
void |
removeBreakpoint(Task task)
Removes the set SteppingBreakpoint from the given Task. |
void |
removeObserver(Observer o,
Proc p,
boolean unblock)
Remove the incoming Observer object from the this.steppingObserver's list of Observers to notify. |
void |
requestAdd()
|
void |
run(LinkedList tasks)
When implemented, re-runs the process from the beginning of the debugging session if proper breakpoints are in place; otherwise just re-executes the process from its start. |
void |
setBreakpoint(Task task,
long address)
Sets a SteppingBreakpoint on the given Task at the given address. |
void |
setRunning(LinkedList tasks)
Set the current state of the given tasks as running. |
void |
setTaskRunning(Task task)
Set the current state of the given task as running. |
void |
setTaskState(Task task,
State state)
Set the state of a particular Task. |
void |
setThreadObserver(Observer o)
Supplies an Observer to be added to the ThreadLifeObserver's Observer list. |
void |
setUp(LinkedList tasks,
boolean isLine)
Sets up stepping information for a list of Tasks. |
void |
stepAdvance(Task task,
DebugInfoFrame frame)
Steps the Task until it reaches the given frame's current address. |
boolean |
stepInstruction(LinkedList tasks)
Perform an instruction step on a list of Tasks. |
boolean |
stepInstruction(Task task)
Perform an instruction step on the given Task. |
boolean |
stepLine(LinkedList tasks)
Perform a line-step on a list of Tasks |
boolean |
stepLine(Task task)
Sets up SteppingEngine to perform a line step on the given Task. |
void |
stepNextInstruction(LinkedList tasks)
Instruction steps the list of Tasks, but ensures that none enter any new frames on the stack. |
void |
stepNextInstruction(Task task,
DebugInfoFrame lastFrame)
Instruction stepping, but stepping-over any function calls. |
void |
stepOut(LinkedList tasks)
Performs a step-out operation on a list of Tasks - runs each Task until it returns from its current frame. |
void |
stepOut(Task task,
Frame frame)
Sets the stage for stepping out of a frame. |
void |
stepOut(Task task,
Frame frame,
State state)
|
void |
stepOver(LinkedList tasks)
Performs a step-over operation on a list of tasks; none of the given Tasks will line-step into any new frames. |
void |
stepOver(Task task,
DebugInfoFrame lastFrame)
Performs a step-operation - line-steps the given Task, unless presented with an entry to a new frame on the stack, which will not be stepped into. |
void |
stop(LinkedList keepRunning,
LinkedList stopTasks)
Re-blocks all running Tasks except for those in the incoming LinkedList. |
void |
updateActionpointDoneEvent(String message,
PrintWriter writer)
Creates an actionpoint done event at the first sight of an action point. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SteppingEngine()
public SteppingEngine(Proc[] procs)
procs
- The Procs to be managed by SteppingEnginepublic SteppingEngine(Proc[] procs, Observer o)
Method Detail |
---|
public boolean addProc(Proc proc)
proc
- The Proc to be added to SteppingEnginepublic boolean stepInstruction(Task task)
task
- The Task to be stepped a single instruction.
public boolean stepInstruction(LinkedList tasks)
tasks
- The Tasks to be stepped a single instruction.
public boolean stepLine(Task task)
task
- The Task to be line-stepped
public boolean stepLine(LinkedList tasks)
tasks
- The Tasks to line step
public void setUp(LinkedList tasks, boolean isLine)
tasks
- The Tasks to begin steppingisLine
- Whether this set up is for a line step or otherwise.public void stepAdvance(Task task, DebugInfoFrame frame)
task
- The Task to be stepped.frame
- The frame on the stack to be continued to.public void stepNextInstruction(Task task, DebugInfoFrame lastFrame)
task
- The stepping TasklastFrame
- The current innermost frame of the Taskpublic void stepNextInstruction(LinkedList tasks)
tasks
- The list of Tasks to be steppedpublic void stepOver(Task task, DebugInfoFrame lastFrame)
task
- The Task to be stepped-overlastFrame
- The current innermost StackFrame of the given Taskpublic void stepOver(LinkedList tasks)
tasks
- The Tasks to step.public void stepOut(Task task, Frame frame)
task
- The Task to be steppedframe
- The frame to step out of.public void stepOut(Task task, Frame frame, State state)
public void stepOut(LinkedList tasks)
tasks
- The Tasks to step-outpublic void cleanUpBreakPoint(Task task)
public void run(LinkedList tasks)
public void continueExecution(LinkedList list)
tasks
- The list of Tasks to be runpublic void continueExecution(Task task)
public boolean continueForStepping(Task task, boolean unblockStepper)
public void stop(LinkedList keepRunning, LinkedList stopTasks)
keepRunning
- The list of Tasks to not blockpublic void executeTasks(LinkedList tasks)
tasks
- The list of tasks to be runpublic boolean isProcRunning(LinkedList tasks)
tasks
- The Tasks to check states for.
public boolean isTaskRunning(Task task)
task
- The Task to check the state of
public void detachProc(Proc proc, boolean kill)
proc
- The Proc to be detachedkill
- Whether the Proc should be killed after detachingpublic void cleanTask(Task task)
task
- The Task to clear information forpublic void clear()
public void setTaskState(Task task, State state)
task
- The Task to set the state ofstate
- The State to set it topublic State getTaskState(Task task)
task
- The Task to return the State of
public frysk.stepping.SteppingEngine.SteppingObserver getSteppingObserver()
public void setBreakpoint(Task task, long address)
task
- The Task to breakpointaddress
- The address to set the breakpoint atpublic void removeBreakpoint(Task task)
task
- The Task to remove the SteppingBreakpoint frompublic Breakpoint getTaskBreakpoint(Task task)
task
- The Task whose breakpoint is requested
public void addBreakpoint(Task task, Breakpoint bp)
task
- The Task to have the Breakpoint added tobp
- The Breakpoint to add to the given Taskpublic void deleteBreakpoint(Task task, Breakpoint bp)
task
- The Task to delete the Breakpoint frombp
- The Breakpoint to delete from the given Taskpublic void setRunning(LinkedList tasks)
tasks
- The Tasks to be set as running.public void setTaskRunning(Task task)
task
- to be set as runningpublic void blockedByActionPoint(Task task, TaskObserver to)
public void blockedByActionPoint(Task task, TaskObserver to, String message, PrintWriter writer)
public void updateActionpointDoneEvent(String message, PrintWriter writer)
message
- - Actionpoint information message to be addedwriter
- - writer to print message topublic void addObserver(Observer o)
o
- The Observer to be added.public void setThreadObserver(Observer o)
o
- The Observer to be added.public HashSet getRunningTasks()
public void removeObserver(Observer o, Proc p, boolean unblock)
o
- The Observer to deletep
- The Proc to delete the Observer fromunblock
- Whether the given Proc should be unblockedpublic void requestAdd()
public BreakpointManager getBreakpointManager()
public void addBlocker(Task task, TaskObserver observer)
task
- the taskobserver
- the blockerpublic LinkedList getBlockers(Task task)
task
- the task
public LinkedList getAndClearBlockers(Task task)
task
- the task
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |