Bug 3346 - [tracker] Stepping
Summary: [tracker] Stepping
Status: SUSPENDED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Unassigned
URL:
Keywords:
: 6514 (view as bug list)
Depends on: 1702 3259 3575 3872 4016 4053 4060 4598 6572 6574 3471 3500 3509 3510 3676 3680 3685 3700 3705 3791 3915 4062 4091 4094 4103 4289 4309 4394 4395 4431 4468 4594 4605 4663 4711 4853 4867 4883 4908 6448
Blocks: 1633
  Show dependency treegraph
 
Reported: 2006-10-11 17:54 UTC by Mike Cvet
Modified: 2008-06-11 20:03 UTC (History)
6 users (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-10-11 17:54:49 UTC
Implement Stop, Start for both all threads of a process simultaneously, or for
individual threads.
Comment 1 Mike Cvet 2006-10-12 20:39:28 UTC
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.
Comment 2 Yao Qi 2006-10-19 06:25:03 UTC
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.
Comment 3 Mike Cvet 2006-11-02 22:32:32 UTC
Yao, I'm having trouble reproducing what you mentioned above; is this still 
happening?
Comment 4 Mike Cvet 2006-11-02 22:35:11 UTC
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.
Comment 5 Mike Cvet 2006-11-03 15:18:21 UTC
Yao, I see the bug now. I'll create a new bug for it - thanks for catching it!
Comment 6 Mike Cvet 2006-11-03 21:58:08 UTC
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.
Comment 7 Mike Cvet 2007-02-09 19:41:03 UTC
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.
Comment 8 Mike Cvet 2007-02-15 18:57:50 UTC
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.
Comment 9 Mike Cvet 2007-02-19 21:40:22 UTC
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.
	
Comment 10 Andrew Cagney 2008-05-27 16:35:30 UTC
*** Bug 6514 has been marked as a duplicate of this bug. ***
Comment 11 Andrew Cagney 2008-06-11 20:03:55 UTC
suspend trackers