[squeak-dev] The Inbox: Tools-jar.1159.mcz

commits at source.squeak.org commits at source.squeak.org
Sun May 29 15:12:56 UTC 2022


A new version of Tools was added to project The Inbox:
http://source.squeak.org/inbox/Tools-jar.1159.mcz

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

Name: Tools-jar.1159
Author: jar
Time: 29 May 2022, 5:12:52.367993 pm
UUID: bed7f2b8-2dd3-9b45-8262-ff51bc9dd5c3
Ancestors: Tools-mt.1158

Fix an inconsistent Debugger behavior WRT the two alternative abandon/termination 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

Complemented by ToolsTests-jar.110 fixing the failing/incorrects tests in ToolsTests-ct.107

=============== Diff against Tools-mt.1158 ===============

Item was changed:
  CodeHolder subclass: #Debugger
+ 	instanceVariableNames: 'interruptedProcess contextStack contextStackIndex contextStackList receiverInspector receiverInspectorState contextVariablesInspector contextVariablesInspectorState externalInterrupt proceedValue selectingPC savedCursor isolationHead failedProject labelString message untilExpression terminationMethod'
- 	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"
- 	"abandon the debugger from its pre-debug notifier"
  	
+ 	terminationMethod := #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.
+ 	
+ 	terminationMethod := #terminateAggressively "debugger's default termination method"!
- 	contextStackIndex := 0.!

Item was changed:
  ----- Method: Debugger>>terminateProcess (in category 'context stack menu') -----
  terminateProcess
+ 	"close the debugger and terminate the debugged process"
  
+ 	terminationMethod := #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: terminationMethod.
- 	interruptedProcess terminateAggressively.
  	interruptedProcess := nil.
  	
  	Smalltalk installLowSpaceWatcher.  "restart low space handler"!



More information about the Squeak-dev mailing list