Bug 4214 - selecting two processes gets two source windows
Summary: selecting two processes gets two source windows
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Mike Cvet
Depends on:
Blocks: 1633
  Show dependency treegraph
Reported: 2007-03-19 15:00 UTC by Andrew Cagney
Modified: 2007-03-30 19:02 UTC (History)
2 users (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cagney 2007-03-19 15:00:52 UTC
In the process picker, selecting two bash processes and then clicking on
quick-debug, leads to two source code windows.

Instead, the two processess should be accessable from the single source code window.
Comment 1 Mike Cvet 2007-03-23 14:40:37 UTC

*** This bug has been marked as a duplicate of 1709 ***
Comment 2 Andrew Cagney 2007-03-23 19:48:08 UTC
This about getting a single source window with a list of processes in the
process/thread pane.  Not multiple source window tabs.
Comment 3 Mike Cvet 2007-03-27 15:29:53 UTC
I'll start taking a look at this then... it's going to require a fairly 
significant overhaul in /srcwin to work properly.
Comment 4 Mike Cvet 2007-03-30 20:02:29 UTC
	2007-03-30  Mike Cvet  <mcvet@redhat.com>
	* RunState.java (tasks): Turned into an array, representing threads
	for multiple processes. Addresses #4214.
	(continueExecution): Set the current process index.
	(stop): Added extra parameter, Tasks to be blocked. Call
	requestAdd() with explicit Task list parameter. Sets current
	process index.
	(setProc): Set number of running tasks. Properly use new global
	Task array. Sets current process index to 0.
	(setProcs): Added. Installs the RunState on an Array of Procs.
	(getNumTasks): Return the number of tasks for selected Proc.
	(removeObserver): Added Proc paramter; use it to check its own
	blockers list, before continuing Tasks.
	(addFailed): Cast Object parameter to Proc to unblock, instead of
	global stateProc. Removed System.exit() call.
	(requestAdd): Removed, no longer overloads requestAdd(LinkedList).
	(requestAdd): Don't set the number of running tasks or current Tasks
	list. Removed System.exit() call. Explicitly add RunState to each Task.
	(requestAddObservers): Removed.
	(blockTasks): Block Tasks belonging to currently-used Proc.
	2007-03-30  Mike Cvet  <mcvet@redhat.com>
	* CLI.java (DetachHandler.handle): Updated call to
	RunState.removeObserver to include Proc parameter.
	(HaltHandler.handle): Update call to RunState.stop to
	include Task list parameter.
	2007-03-30  Mike Cvet  <mcvet@redhat.com>
	* SourceWindow.java (dom): Now an array. Addresses #4214.
	(swProc): Ditto.
	(frames): Now a two-dimensional array. Proc x Task.
	(current): Added. Process array index integer.
	(numProcs): Added. Number of processes currently maintained by
	the SourceWindow.
	(SourceWindow): New constructor. Takes an array of Procs.
	(SourceWindow): Other two constructors - edit to properly use
	new global arrays for DOM, Procs, and StackFrames.
	(finishSourceWin): Fill up entire StackFrame 2D array. Removed RunState
	state check before calling populateStackBrowser.
	(populatStackBrowser): Now takes 2D array. Takes into account new
	arrays for #4214. Call updateShownStackFrame() with current process
	(setSwProc): Removed.
	(updateShownStackFrame): Takes new int parameter - new process index.
	If DOMSource can't be resolved from the StackFrame Lines, add it into
	the DOM and re-try. Set the global process index.
	(removeTags): Only untag current process.
	(createTags): Only tag current process.
	(doStop): Use Proc array; send in Task list to RunState.
	(doContinue): Use Proc array.
	(toggleRegisterWindow): Ditto.
	(toggleMemoryWindow): Ditto.
	(toggleDisassemblyWindow): Ditto.
	(getProcIsa): Ditto.
	(generateProcStackTrace): Now only takes a Task LinkedList parameter.
	More intelligently setup variables for stack tracing. Set up DOM for
	current process only.
	(currentStackChanged): Takes process index integer parameter. Calls
	updated updateShownStackFrame().
	(LockObserver.update): Flipped if statement; handle process array.
	* CurrentStackView.java (StackViewListener): Set currentStackChanged
	to accept int parameter.
	(stackArray): Added.
	(CurrentStackView): Takes 2D array.
	(refreshProc): Added. Instead of dumping the TreeModel; selectively
	replaces rows corresponding to Proc index parameter. Adjusts model
	length as necessary.
	(buildTree): Rewritten. Now three levels of rows; Proc, Task, 
	(selectRow): Updated to grab appropriate StackFrame row.
	(selectionChangedEvent): Updated to use new model. Ignores request if
	request was not a StackFrame row.
	* SourceView.java (drawMargin): Make sure SourceBuffer.isLineBroken()
	and .isLineExecutable are temporarily disabled.
	* SourceWindowFactory.java (createSourceWindow): Removed redundant
	HashMap access.
	(createSourceWindow): Added - Takes a Proc array. Creates a SourceWindow
	with multiple processes; keeps track of all processes to the 
	in the HashMap.
	(SourceWinListener.lifeCycleQuery): Update call to 
	to include Proc.
	* StepDialog.java (model): Added.
	(setType): Now will update listed Tasks if the observed process has
	changed since last call.
	* ThreadSelectionDialog.java (stopTasks): Added. List of Tasks to be
	(grabTasks): Update stopTasks.
	(getStopTasks): Added.
	2007-03-30  Mike Cvet  <mcvet@redhat.com>
	* druid/CreateFryskSessionDruid.java (.buttonEvent): Updated to build
	array of selected processes to send to SourceWindowFactory, for #4214.
	* DisassemblyWindowFactory.java (.lifeCycleQuery): Update call to
	RunState.removeObserver to include observed process.
	* MemoryWindowFactory.java (.lifeCycleQuery): Ditto.
	* RegisterWindowFactory.java (.lifeCycleQuery): Ditto.