Implement Stop, Start for both all threads of a process simultaneously, or for
Works for entire Procs - individual Tasks to come later.
2006-10-12 Mike Cvet <firstname.lastname@example.org>
* 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.
(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
(handleTask): Added code to determine whether or not the event is
a SourceWindow creation or a Stop/Continue; creates or generates
information as necessary.
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
Instruction stepping for multiple threads has now been implemented.
2006-11-02 Mike Cvet <email@example.com>
* ThreadSelectionDialog.java (ThreadSelectionDialog): Calls
* 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
(finishSourceWin): Calls update getSwProc().
(handleTask): Taken out of a second unnecessary CustomEvents
* SourceWindow.java (unblockProc): Added a
requestDeleteTerminatingObserver call to handle the update
(step): Added. Unblocks tasks under an InstructionObserver.
(stepCompleted): Added. Re-sensitizes the SourceWindow after
(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.
(createMenus): Added MenuItem for StepDialog.
(getSwProc): Refactored from getMyproc().
(setSwProc): Refactored from setMyProc().
(createActions): Removed toggleMainThread Action.
(procReblocked): Changed to protected.
2006-10-31 Mike Cvet <firstname.lastname@example.org>
* 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 <email@example.com>
* SourceWindow.java (stepIn): Added. Handles calls from
InstructionObserver callbacks to check
and see if the latest instruction has changed the currently-executing
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
(executeTasks): Updated to use SW_state to find the state of the
(generateProcStackTrace): Moved over from SourceWindowFacotory.
Replaces most parameters by using global variables from this class.
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
Instruction stepping, Line stepping, Step-over and Step-out now have basic
implementations in RunState.java. Pending libunwind bugs, the latter two will
2007-02-09 Mike Cvet <firstname.lastname@example.org>
* 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.
(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
(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
* TestStepping.java (setUpTest): Ditto.
2007-02-15 Mike Cvet <email@example.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
(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.
2007-02-19 Mike Cvet <firstname.lastname@example.org>
* TestRunState.java (testStepOver): 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.
(stepOver): Compare frames using FrameIdentifier instead of CFA.
Check for missing frames via #4060.
(continueExecution): Refactored from run(). Removes ambiguity from
(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. ***