[Vm-dev] VM Maker: VMMakerUI-eem.36.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jan 2 22:15:46 UTC 2021


Eliot Miranda uploaded a new version of VMMakerUI to project VM Maker:
http://source.squeak.org/VMMaker/VMMakerUI-eem.36.mcz

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

Name: VMMakerUI-eem.36
Author: eem
Time: 2 January 2021, 2:15:45.244517 pm
UUID: 659bb988-8f11-4268-aa1c-d0ce3c656343
Ancestors: VMMakerUI-eem.35

Simulation:
Fix some issues with click step.  Make proceed turn off a boolean breakpoint so that proceed actually proceeds rather than immediately stopping.  Have the click step dialog inform whether simulation is in machine code or in the interpreter.  Avoid the search for open debuggers crashing when debugging the search for open debuggers ;-)

=============== Diff against VMMakerUI-eem.35 ===============

Item was added:
+ ----- Method: Cogit>>inMachineCode (in category '*VMMakerUI-accessing') -----
+ inMachineCode
+ 	<doNotGenerate>
+ 	"Answer if the processor's sp & fp are the current valid system frame pointers."
+ 	^processor pc between: guardPageSize and: methodZone zoneEnd!

Item was changed:
  ----- Method: Cogit>>processorFrameValid (in category '*VMMakerUI-accessing') -----
  processorFrameValid
+ 	<doNotGenerate>
  	"Answer if the processor's sp & fp are the current valid system frame pointers."
  	^processorFrameValid!

Item was changed:
  ----- Method: Cogit>>promptClickStep (in category '*VMMakerUI-user interface') -----
  promptClickStep
  	<doNotGenerate>
  	^UserDialogBoxMorph
  		confirm: 'step?'
  		orExtraValue: #proceed
  		label: 'proceed'
+ 		title: (self inMachineCode ifTrue: ['In machine code'] ifFalse: ['In the interpreter'])
- 		title: 'Click step'
  		at: nil!

Item was changed:
  ----- Method: Cogit>>setClickStepBreakBlock (in category '*VMMakerUI-user interface') -----
  setClickStepBreakBlock
  	"Set the break block to present a confirmer, breaking if true, and restoring the previous break block.
  	 If an open debugger on the receiver can be found, proceed it."
  	<doNotGenerate>
  	| previousBreakBlock previousAtEachStepBlock previousBreakPC previousSingleStep previousClickConfirm result |
  	(breakBlock isNil or: [breakBlock method ~~ thisContext method]) ifTrue:
  		[previousBreakBlock := breakBlock.
  		 previousAtEachStepBlock := coInterpreter atEachStepBlock.
  		 previousBreakPC := breakPC.
  		 previousSingleStep := singleStep.
  		 previousClickConfirm := clickConfirm.
  		 breakBlock := [:ign|
  						(processor pc ~= previousBreakPC
  						 and: [(result := self promptClickStep) == true])
  							ifTrue: [false]
  							ifFalse: [breakBlock := previousBreakBlock.
  									coInterpreter atEachStepBlock: previousAtEachStepBlock.
+ 									breakPC := previousBreakPC == true ifTrue: [false] ifFalse: [previousBreakPC].
- 									breakPC := previousBreakPC.
  									singleStep := previousSingleStep.
  									clickConfirm := previousClickConfirm.
  									true]].
  		 coInterpreter atEachStepBlock:
  								[previousAtEachStepBlock value.
  								 (coInterpreter localIP ~= previousBreakPC
  								  and: [(result := self promptClickStep) == true]) ifFalse:
  									[breakBlock := previousBreakBlock.
  									coInterpreter atEachStepBlock: previousAtEachStepBlock.
+ 									breakPC := previousBreakPC == true ifTrue: [false] ifFalse: [previousBreakPC].
- 									breakPC := previousBreakPC.
  									singleStep := previousSingleStep.
  									clickConfirm := previousClickConfirm.
  									self halt]].
  		 singleStep := breakPC := clickConfirm := result ~~ #proceed].
  	(World submorphs
  		detect:
  			[:m|
  			 m model isDebugger
+ 			 and: [(m model interruptedProcess suspendedContext
+ 					ifNil: [false] "happens if we're debugging this very method..."
+ 					ifNotNil:
+ 						[:suspendedContext|
+ 						 suspendedContext findContextSuchThat:
+ 							[:ctxt|
+ 							(ctxt receiver == self
+ 							 and: [ctxt selector == #simulateCogCodeAt:
+ 								or: [ctxt selector == #simulateLeafCallOf:]])
+ 							or: [ctxt receiver == coInterpreter
+ 							 and: [ctxt selector == #interpret]]]]) notNil]]
- 			 and: [(m model interruptedProcess suspendedContext findContextSuchThat:
- 					[:ctxt|
- 					(ctxt receiver == self
- 					 and: [ctxt selector == #simulateCogCodeAt:
- 						or: [ctxt selector == #simulateLeafCallOf:]])
- 					or: [ctxt receiver == coInterpreter
- 					 and: [ctxt selector == #interpret]]]) notNil]]
  		ifNone: []) ifNotNil:
  			[:debuggerWindow|
  			 WorldState addDeferredUIMessage:
  				[debuggerWindow model proceed]]!



More information about the Vm-dev mailing list