Bug 4309 - Expand RunState to allow multiple processes to execute/step independently
Summary: Expand RunState to allow multiple processes to execute/step independently
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: 2935 3346
  Show dependency treegraph
 
Reported: 2007-04-02 16:12 UTC by Mike Cvet
Modified: 2007-04-10 20:04 UTC (History)
0 users

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 2007-04-02 16:12:58 UTC
Although multiple processes are currently allowed in the SourceWindow, most of 
the state transitioning in RunState can only apply to one process at a time. 
i.e. - allow one process to 'continue' while stepping the second.
Comment 1 Mike Cvet 2007-04-10 21:04:58 UTC
Log message:
	frysk-core/frysk/rt:
	2007-04-08  Mike Cvet  <mcvet@redhat.com>
	
	* RunState.java (contextMap): Added.
	(numRunningTasks): Removed.
	(state): Removed.
	(stateMap): Added. Allows finer-grained Task control.
	(RunState): Initialize contextMap and new synchronized stateMap.
	(setUp): Takes an int state parameter. Records the state of each
	Task passing through this method as defined by int parameter.
	(setUpLineStep): Check state of requested Task before proceeding.
	Set Task-specific states.
	(stepInstruction): Ditto.
	(setUpLineStep): Check to see if any Tasks belonging to the List
	parameter are not stopped.
	(stepInstruction): Ditto. Set Task-specific states.
	(setUpNextInstruction): Set Task-specific states.
	(stepNextInstruction): Ditto.
	(setUpStepOver): Ditto.
	(stepOver): Ditto.
	(setUpStepOut): Ditto.
	(stepOut): Ditto.
	(stepUpStepAdvance): Ditto.
	(stepCompleted): Removed.
	(runCompleted): Ditto.
	(decNumRunningTasks): Ditto.
	(getNumRunningTasks): Ditto.
	(setNumRunningTasks): Ditto.
	(setState): Ditto.
	(continueExecution): Insert into context map the number of threads
	designated as running by process. Mark state of each thread
	individually as running.
	(stop): Renamed first parameter. Resets current process index.
	(executeTasks): Removed references to global state int. Mark individual
	Task states and number of running Tasks to their Proc in context map.
	(setRunning): Takes List of Tasks as parameter, sets states to running.
	(getState): Takes Task parameter, returns state of that Task.
	(isProcRunning): Added. Returns true if any of the given Tasks are
	running, as defined by RunState.
	(setProc): Mark individual Tasks as running, insert number of running
	Tasks for process into context map.
	(setProcs): Ditto.
	(addProc): Insert number of running Tasks for new process into context
	map.
	(updateExecuted): Grab state of incoming Task out of stateMap. Update
	stored state of Task. Update number of running Tasks for its Proc.
	(PersistentBreakpoint.updateHit): Check state of incoming Task.	Update
	number of running Tasks for its process.
	* TestRunState.java (stepAssertions): Removed calls to
	RunState.stepCompleted().
	* TestStepping.java (testStepSigLongJmp): Marked broken for #4289.
	(assertions): Removed call to RunState.stepCompleted().
	
	frysk-gui/frysk/gui/srcwin:
	2007-04-08  Mike Cvet  <mcvet@redhat.com>
	
	* SourceWindow.java (SourceWindow): Update call to
	RunState.setRunning().
	(finishSourceWin): Update switch call to RunState.getState() to
	getTaskState() and isProcRunning().
	(populateStackBrowser): Ditto.
	(procReblocked): Removed calls to RunState.runCompleted() and
	stepCompleted().
	(getState): Added. Returns state of currently-selected Task.
	(updateShownStackFrame): Checks current sensitivity of SourceWindow
	versus state of requested Task; enables functionality if it won't break
	anything. Sets title for SourceWindow if switching to a running process
	and desensitizes as necessary.
	(generateProcStackTrace): Changed RunState.getState() to
	isProcRunning().
	* SourceView.java (mouseMotionEvent): Changed RunState.getState() to
	SourceWindow.getState().
	
	frysk-core/frysk/hpd:
	2007-04-08  Mike Cvet  <mcvet@redhat.com>
	
	* hpd/CLI.java (RunStateObserver.update): Updated calls to
	RunState.getState() to getTaskState(Task).