[Vm-dev] VM Maker: VMMakerUI-eem.49.mcz
commits at source.squeak.org
commits at source.squeak.org
Mon Oct 18 01:04:41 UTC 2021
Eliot Miranda uploaded a new version of VMMakerUI to project VM Maker:
http://source.squeak.org/VMMaker/VMMakerUI-eem.49.mcz
==================== Summary ====================
Name: VMMakerUI-eem.49
Author: eem
Time: 17 October 2021, 6:04:39.6084 pm
UUID: 041ca5cc-0316-41dc-aa4f-e1a3cf780180
Ancestors: VMMakerUI-eem.48
Part of VMMaker.oscog-eem.3093. Have setClickStepBreakBlock avoid stopping twice when click stepping in bytecode. Maintain clickstepping so that CoInteropreter's atEachStepBlock can avoid recursing.
=============== Diff against VMMakerUI-eem.48 ===============
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: [self inMachineCode
+ and: [(result := self promptClickStep) == true]])
- and: [(result := self promptClickStep) == true])
ifTrue: [false]
ifFalse: [breakBlock := previousBreakBlock.
coInterpreter atEachStepBlock: previousAtEachStepBlock.
+ breakPC := (previousBreakPC isBreakpointFor: processor pc) ifTrue: [false] ifFalse: [previousBreakPC].
- breakPC := previousBreakPC == true ifTrue: [false] ifFalse: [previousBreakPC].
singleStep := previousSingleStep.
clickConfirm := previousClickConfirm.
result ~~ #proceed]].
coInterpreter atEachStepBlock:
+ [clickStepping := true.
+ [previousAtEachStepBlock value] ensure: [clickStepping := false].
- [previousAtEachStepBlock value.
(coInterpreter localIP ~= previousBreakPC
+ and: [self inMachineCode not
+ and: [(result := self promptClickStep) == true]]) ifFalse:
- and: [(result := self promptClickStep) == true]) ifFalse:
[breakBlock := previousBreakBlock.
coInterpreter atEachStepBlock: previousAtEachStepBlock.
+ breakPC := (previousBreakPC isBreakpointFor: coInterpreter localIP) ifTrue: [false] ifFalse: [previousBreakPC].
- breakPC := previousBreakPC == true ifTrue: [false] ifFalse: [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 or: [ctxt selector == #halt "initial launch doit"]]]]]) notNil]]
ifNone: [])
ifNotNil:
[:debuggerWindow|
WorldState addDeferredUIMessage:
[debuggerWindow model proceed]]!
More information about the Vm-dev
mailing list