Bug 3510 - Create core class to handle stepping/stopping/continue work for sourcewindow and HPD
Summary: Create core class to handle stepping/stopping/continue work for sourcewindow ...
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Mike Cvet
URL:
Keywords:
Depends on:
Blocks: 1633 3346
  Show dependency treegraph
 
Reported: 2006-11-12 16:35 UTC by Mike Cvet
Modified: 2006-11-23 22:54 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Cvet 2006-11-12 16:35:09 UTC
To go into frysk.rt; common class for both. Testable.
Comment 1 Mike Cvet 2006-11-12 18:41:09 UTC
frysk-core/frysk/rt:
2006-11-12  Mike Cvet  <mcvet@redhat.com>

	* StateModel.java (StateModel): Added. Handles SourceWindow and HPD 
	stop/continue/stepping. Addresses #3510.
	(stepIn): Moved over from SourceWindow.
	(stepOver): Ditto.
	(lineMap): Ditto.
	(stepCompleted): Ditto.
	(run): Ditto.
	(runningTasks): Ditto. 
	(executeTasks): Ditto.
	(stepOut): Ditto.
	(stop): Ditto.
	(setUpStep): Ditto.
	(lineLoopCount): Ditto.
	(dwflMap): Ditto.
	(pbo): Ditto.
	(stepInstruction): Ditto.

frysk-gui/frysk/gui/srcwin:
2006-11-12  Mike Cvet  <mcvet@redhat.com>

	* SourceWindow.java (procReblocked): Moved work to StateModel.
	(doStep): Ditto.
	(doStop): Ditto.
	(stepCompleted): Ditto. 
	(doRun):  Ditto.
	(stepInstruction): Ditto.
	(executeTasks): Ditto.
	(SourceWinBlocker..run): Ditto.
	(finishSourceWin): Removed some initializations.
	(SourceWinBlocker.SourceWinBlocker): Updated to call methods in
	StateModel.
	(generateProcStackTrace): Ditto.
	(numSteppingThreads): Ditto.
	(SourceWinBlocker.existingTask): Ditto.
	
	* StepDialog.java (.buttonEvent): Updated to call refactored SourceWindow
	methods.
Comment 2 Mike Cvet 2006-11-23 22:54:58 UTC
* StateModel.java: Refactored to RunState.java.
        * RunState.java: Refactored from StateModel.java.
        (pbo): Removed. ProcBlockObserver is no longer used.
        (stateProc): Added. The Proc this RunState is responsible for.
        (tasks): Added. LinkedList of Tasks belonging to stateProc.
        (numRunningTasks): Number of Tasks belonging to stateProc in the
        unblocked state.
        (RunState): Removed reference to ProcBlockObserver. This class
        now extends Observable and implements TaskObserver.Instruction
        directly. Fixes #3538.
        (getNumRunningTasks): Added.
        (setNumRunningTasks): Added.
        (getNumObservers): Added. Returns the number of Observers in this
        Observable's Observer list.
        (removeObserver): Added. Calls deleteObserver() with the additional
        stipulation of releasing all Tasks if there are no more Observers
        watching them.
        (setProc): Added. Sets stateProc and tasks, and blocks all tasks from
        the incoming Proc.
        (updateExecuted): Added. Callback for TaskObserver.Instruction. Notify
        all watching observers that a task has been re-blocked.
        (addedTo): Added. Callback for TaskObserver.Instruction.
        (deletedFrom): Ditto.
        (addFailed): Ditto.
        (requestAdd): Schedules this Observer to be added to all Tasks.
        (requestAddObservers): Adds this InstructionObserver to the incoming 
Task.
        (blockTask): Schedules this InstructionObserver to be added to all
        incoming Tasks.
        (getNumTasks): Added.
        * tests/TestStateModel: Refactored to TestRunState.
        * tests/TestRunState: Refactored from TestStateModel. Updated to use
        RunState.