Implement Stop, Start for both all threads of a process simultaneously, or for individual threads.
Works for entire Procs - individual Tasks to come later. 2006-10-12 Mike Cvet <mcvet@redhat.com> * SourceWindow.java (populateStackBrowser): Don't rebuild the StackView from scratch on subsequent calls (via stop/start). Made public. Now called from global ProcAttachedObserver on Proc re-block. Addresses #3346. (getDOM): Added. (SourceWindow): Create a new global ProcAttachedObserver object. (doRun): Makes a call to unblockProc() - runs the process from the blocked state. (unblockProc): Added - Deletes the blocking observer from each of the Proc's Tasks. (doStop): Moved individual de/sensitization of widgets to procReblocked(). Calls iterateAttach() from the global ProcAttachedObserver to block all Tasks. Desensitizes SourceWindow. (procReblocked): Re-de/sensitizes widgets after the Proc being observed has been re-blocked by the observer. * SourceWindowFactory.java (generateProcStackTrace): Added. Creates a new DOMFrysk if necessary; handles stack trace re/generation. (finishSourceWin): Calls generateProcStackTrace() for stack trace generation. (handleTask): Added code to determine whether or not the event is a SourceWindow creation or a Stop/Continue; creates or generates information as necessary.
Hi, Mike, I run run/stop buttons for a test. There is one problem about run/stop buttons. When I click stop button at the time target program is runnig, this button indeed stop the target program and highlight the source code in that line. However, the SW still could not display the source code around the hightlight line, but display source code always from line #1. This problem is a little like what we have discusssed before.
Yao, I'm having trouble reproducing what you mentioned above; is this still happening?
Instruction stepping for multiple threads has now been implemented. frysk-gui/frysk/gui/srcwin: 2006-11-02 Mike Cvet <mcvet@redhat.com> * ThreadSelectionDialog.java (ThreadSelectionDialog): Calls updated getSwProc(). * StepDialog.java: Added. * SourceWindowFactory.java (SourceWinBlocker.existingTask): Built in ability to handle step events and re-generate SourceWindow content upon completion of stepping for all Tasks. (finishSourceWin): Calls update getSwProc(). (SourceWinListener.lifeCycleQuery): Ditto. (handleTask): Taken out of a second unnecessary CustomEvents event. * SourceWindow.java (unblockProc): Added a requestDeleteTerminatingObserver call to handle the update to ProcBlockObserver. (step): Added. Unblocks tasks under an InstructionObserver. (stepCompleted): Added. Re-sensitizes the SourceWindow after step completion. (executeTasks): Refactored from executeThreads(). Removed obsolete boolean checks. (SourceWindow): Added a StepDialog reference. General clean-up of constructor and class. (createActions): Added Listener for StepDialog. (toggleStepDialog): Added. (createMenus): Added MenuItem for StepDialog. (mainThreadReblocked): Removed. (setMyTask): Removed. (getMyTask): Removed. (getSwProc): Refactored from getMyproc(). (setSwProc): Refactored from setMyProc(). (stepMainThread): Removed. (createActions): Removed toggleMainThread Action. (procReblocked): Changed to protected. frysk-core/frysk/proc: 2006-10-31 Mike Cvet <mcvet@redhat.com> * ProcBlockObserver.java (.execute): Added null proc check properly. Iterate through all tasks to add this observer rather than just letting the main task propagate to the others. (addedTo): Removed observer handling code. (updateExecuted): Removed isAdded check.
Yao, I see the bug now. I'll create a new bug for it - thanks for catching it!
Line stepping done - grabs all threads and steps their lines by one. 2006-11-03 Mike Cvet <mcvet@redhat.com> * SourceWindow.java (stepIn): Added. Handles calls from InstructionObserver callbacks to check and see if the latest instruction has changed the currently-executing line in the source file. (procReblocked): Updated to use SW_state to find the state of the SourceWindow. Removed setSensitive() calls and now calls resensitize(). (stepCompleted): Ditto. Removed setSensitive() calls and now calls desensitize(). (doRun): Ditto. (executeTasks): Updated to use SW_state to find the state of the SourceWindow. (generateProcStackTrace): Moved over from SourceWindowFacotory. Replaces most parameters by using global variables from this class. Don't re-build the DOM after each call, unnecessary. (doStep): Grabs all threads belonging to this Proc, checks to see if their line number is listed. If not, adds an entry into new HashMaps for them and unblocks them. Removed setSensitive() calls and now calls desensitize(). (dwflMap): Added. (lineMap): Added. (desensitize): Added. (resensitize): Added.
Instruction stepping, Line stepping, Step-over and Step-out now have basic implementations in RunState.java. Pending libunwind bugs, the latter two will be enabled. Log message: frysk-core/frysk/rt: 2007-02-09 Mike Cvet <mcvet@redhat.com> * RunState.java (setUp): Refactored from setUpStep(). (setUpLineStep): Used to specifically set up line stepping; meat of initialization now done in setUp(). (stepIn): Added a special case for when step-over requires a line step. (setUpStepOver): Finalized workflow - correctly sets up states for stepping over, for single-threaded process. (stepOver): Finalized workflow - correctly sets breakpoint for single-threaded stepping-over. Not visible from SourceWindow until libunwind bugs are resolved. (finishStepOver): Removed. (setUpStepOut): Finalized workflow - correctly sets up breakpoint and info for stepping-out. Not visible until libunwind bugs are resolved. (stepOut): Properly removes breakpoint and cleans up after a step-out. (updateExecuted): Cleaned up; correctly behaves for stepping over and out. (Breakpoint.updateHit): Re-adds the RunState InstructionObserver after hitting the breakpoint. Returns blocking state. (Breakpoint.addedTo): Removes the RunState InstructionObserver. * TestRunState.java (testLineStepping): Changed to use refactored RunState.setUpLineStep(). (stepAssertions): Ditto. * TestStepping.java (setUpTest): Ditto. (stepAssertions): Ditto.
Log message: frysk-core/frysk/rt: 2007-02-15 Mike Cvet <mcvet@redhat.com> * StackFrame.java (getDOMSource): Refactored from getData(). Changed to match getDOMFunction(). * RunState.java (STEP_INSTRUCTION): Refactored from INSTRUCTION_STEP to match other macros. (STEP_INSTRUCTION_NEXT, STEP_INSTRUCTION_NEXT_OVER): Added for instruction-level 'step over.' (stepInstruction): Added - new overloaded method for instruction stepping; takes a Task. (setUpStepNextInstruction): Added - new method for instruction step-over. (setUpStepNextInstruction): Added - overloaded above. (stepNextInstruction): Added. Performs instruction-level step-over. (stepOver): Removed debugging statements. (cleanUpBreakPoint): Nullify breakpoint. (LockObserver.update): Added new cases for instruction step-over. (LockObserver.blockTask): Removed redundant call for adding observer.
Log message: frysk-core/frysk/rt: 2007-02-19 Mike Cvet <mcvet@redhat.com> * TestRunState.java (testStepOver): Added. (testInstructionNext): Added. (stepOverAssertions): Added. Assertions for above step-over tests. * RunState.java: Added some more state macros. (setUpNextInstruction): Assign both the current frame's FrameIdentifier, as well as the outer frame's for use later. (stepNextInstruction): Use FrameIdentifier to compare StackFrames. Due to #4060, check for a missing frame and re-step an instruction. (stepIn): Removed step-over double-step hack. (frameIdentifier, outerFrameIdentifier): New. FrameIdentifiers for the outer, and double-outer StackFrames upon return from a step-over or step-out call. (setUpStepOver): Set taskStepCount properly. Set FrameIdentifiers. (setUpStepOut): Ditto. (stepOver): Compare frames using FrameIdentifier instead of CFA. Check for missing frames via #4060. (continueExecution): Refactored from run(). Removes ambiguity from functionality. (run): Added. Will restart the process from scratch. (updateExecuted): Improved stepping cases. Added code to deal with instruction level step-over.
*** Bug 6514 has been marked as a duplicate of this bug. ***
suspend trackers