[squeak-dev] The Trunk: Tools-mt.1162.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Jun 13 07:41:55 UTC 2022


Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1162.mcz

==================== Summary ====================

Name: Tools-mt.1162
Author: mt
Time: 13 June 2022, 9:41:53.132751 am
UUID: 8ebd5c52-0370-2d46-80c1-bac2e1aa420a
Ancestors: Tools-eem.1161, Tools-ct.1159, Tools-jar.1161, Tools-ct.1148

Merge fixes from Tools-ct.1159, Tools-jar.1161, Tools-ct.1148.

Tools-ct.1159:
	Fixes a tedious #codeChangedElsewhere bug in the class definition view of system browsers. [...]

Tools-jar.1161:
	Fix an inconsistent Debugger behavior WRT the new alternative abandon/terminate/destroy modes introduced by Kernel-ct.1434 and Tools-ct.1092. [...]

Following up a conversation in http://lists.squeakfoundation.org/pipermail/squeak-dev/2022-May/220675.html

Tools-ct.1148:
	Implements #windowReqNewLabel: on Debugger to be able to re-relabe Debugger windows via Shift+Red-Click.

=============== Diff against Tools-eem.1161 ===============

Item was added:
+ ----- Method: Browser>>updateCodePaneIfNeeded (in category 'self-updating') -----
+ updateCodePaneIfNeeded
+ 
+ 	super updateCodePaneIfNeeded.
+ 	
+ 	(self didCodeChangeElsewhere and: [self hasUnacceptedEdits not])
+ 		ifTrue:
+ 			[self setClassDefinition.
+ 			self contentsChanged].!

Item was changed:
  CodeHolder subclass: #Debugger
+ 	instanceVariableNames: 'interruptedProcess contextStack contextStackIndex contextStackList receiverInspector receiverInspectorState contextVariablesInspector contextVariablesInspectorState externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject labelString message untilExpression terminateProcessSelector'
- 	instanceVariableNames: 'interruptedProcess contextStack contextStackIndex contextStackList receiverInspector receiverInspectorState contextVariablesInspector contextVariablesInspectorState externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject labelString message untilExpression'
  	classVariableNames: 'ContextStackKeystrokes ErrorReportServer FullStackSize InterruptUIProcessIfBlockedOnErrorInBackgroundProcess NotifierStackSize SavedExtent StackSizeLimit WantsAnnotationPane'
  	poolDictionaries: ''
  	category: 'Tools-Debugger'!
  
  !Debugger commentStamp: 'mt 12/17/2019 12:19' prior: 0!
  I represent the machine state at the time of an interrupted process. I also represent a query path into the state of the process. The debugger is typically viewed through a window that views the stack of suspended contexts, the code for, and execution point in, the currently selected message, and inspectors on both the receiver of the currently selected message, and the variables in the current context.
  
  Special note on recursive errors:
  Some errors affect Squeak's ability to present a debugger.  This is normally an unrecoverable situation.  However, if such an error occurs in an isolation layer, Squeak will attempt to exit from the isolation layer and then present a debugger.  Here is the chain of events in such a recovery.
  
  	* A recursive error is detected.
  	* The current project is queried for an isolationHead
  	* Changes in the isolationHead are revoked
  	* The parent project of isolated project is returned to
  	* The debugger is opened there and execution resumes.
  
  If the user closes that debugger, execution continues in the outer project and layer.  If, after repairing some damage, the user proceeds from the debugger, then the isolationHead is re-invoked, the failed project is re-entered, and execution resumes in that world. 
  
  ---
  
  In September 2019, we added MorphicDebugger and MVCDebugger to untangle framework-specific features in our debugger infrastructure. However, this is just an intermediate step. The overall goal would be to remove those two subclasses again while preserving their functionality. Mostly, MVC and Morphic differ in their GUI-process management. This means that "proceed" and "close" work differently depending on the process that is being debugged. --- One idea is to attach that framework-specific information to the process objects. See Process >> #environmentAt: and #environmentAt:put:. Also see ToolSet's #handle* and #debug* methods.!

Item was changed:
  ----- Method: Debugger>>abandon (in category 'context stack menu') -----
  abandon
+ 	"Close the debugger and terminate the debugged process from the pre-debugger notifier window."
- 	"abandon the debugger from its pre-debug notifier"
  	
+ 	self flag: #dicuss. "mt: Wouldn't it be better to let the current ensure block finish from within the pre-debugger notifier window? To use #terminate instead?"
+ 	terminateProcessSelector := #terminateAggressively.
+ 	self close
+ !
- 	self close.!

Item was changed:
  ----- Method: Debugger>>initialize (in category 'initialize') -----
  initialize
  
  	super initialize.
  
  	Smalltalk at: #MessageTally ifPresentAndInMemory: [ :tally |
  		tally terminateTimerProcess].
  
  	externalInterrupt := false.
  	selectingPC := true.
  	
+ 	contextStackIndex := 0.
+ 	
+ 	"The default termination procedure is aggressive to ignore currently running, and thus erroneous, ensure-blocks in the debugged process."
+ 	terminateProcessSelector := #terminateAggressively.!
- 	contextStackIndex := 0.!

Item was changed:
  ----- Method: Debugger>>terminateProcess (in category 'context stack menu') -----
  terminateProcess
+ 	"Close the debugger and terminate the debugged process. Note that we use #terminate instead of #terminateAggressively to let any current ensure-block finish."
  
+ 	terminateProcessSelector := #terminate.
+ 	self close
+ !
- 	interruptedProcess terminate.
- 	interruptedProcess := nil.
- 	self close.!

Item was changed:
  ----- Method: Debugger>>windowIsClosing (in category 'initialize') -----
  windowIsClosing
  	"My window is being closed; clean up. Restart the low space watcher."
  
  	contextStack := nil.
  	receiverInspector := nil.
  	contextVariablesInspector := nil.
  	
  	interruptedProcess == nil ifTrue: [^ self].
+ 	[interruptedProcess perform: terminateProcessSelector.
+ 	interruptedProcess := nil] fork.
- 	interruptedProcess terminateAggressively.
- 	interruptedProcess := nil.
  	
  	Smalltalk installLowSpaceWatcher.  "restart low space handler"!

Item was added:
+ ----- Method: Debugger>>windowReqNewLabel: (in category 'user interface') -----
+ windowReqNewLabel: newLabel
+ 
+ 	labelString := newLabel.
+ 	^ true!



More information about the Squeak-dev mailing list