--- a/DebugView.st Tue Feb 20 21:38:21 1996 +0100
+++ b/DebugView.st Tue Feb 20 21:42:45 1996 +0100
@@ -276,51 +276,51 @@
us here
"
(grabber := device activePointerGrab) notNil ifTrue:[
- device ungrabPointer
+ device ungrabPointer
].
(inspectedProcess suspendedContext isNil
or:[Processor isSystemProcess:inspectedProcess]) ifTrue:[
- terminateButton disable.
+ terminateButton disable.
] ifFalse:[
- terminateButton enable.
- abortButton enable.
+ terminateButton enable.
+ abortButton enable.
].
drawableId notNil ifTrue:[
- "
- not the first time - disable buttons & menus
- from previous life
- "
- terminateButton turnOffWithoutRedraw.
- continueButton turnOffWithoutRedraw.
- returnButton turnOffWithoutRedraw.
- restartButton turnOffWithoutRedraw.
- abortButton turnOffWithoutRedraw.
- nextButton turnOffWithoutRedraw.
- stepButton turnOffWithoutRedraw.
- sendButton turnOffWithoutRedraw.
+ "
+ not the first time - disable buttons & menus
+ from previous life
+ "
+ terminateButton turnOffWithoutRedraw.
+ continueButton turnOffWithoutRedraw.
+ returnButton turnOffWithoutRedraw.
+ restartButton turnOffWithoutRedraw.
+ abortButton turnOffWithoutRedraw.
+ nextButton turnOffWithoutRedraw.
+ stepButton turnOffWithoutRedraw.
+ sendButton turnOffWithoutRedraw.
- m := contextView middleButtonMenu.
- m notNil ifTrue:[
- m disableAll:#(showMore skip skipForoReturn inspectContext).
- ]
+ m := contextView middleButtonMenu.
+ m notNil ifTrue:[
+ m disableAll:#(showMore skip skipForoReturn inspectContext).
+ ]
] ifFalse:[
- self iconLabel:'Debugger'.
+ self iconLabel:'Debugger'.
].
windowGroup isNil ifTrue:[
- windowGroup := WindowGroup new.
- windowGroup addTopView:self.
+ windowGroup := WindowGroup new.
+ windowGroup addTopView:self.
].
exclusive ifFalse:[
- "/ create a (modal) windowGroup for myself
+ "/ create a (modal) windowGroup for myself
- windowGroup setModal:true.
+ windowGroup setModal:true.
] ifTrue:[
- "/ create a windowGroup with a synchronous sensor for me
+ "/ create a windowGroup with a synchronous sensor for me
- windowGroup sensor:(SynchronousWindowSensor new device:device).
+ windowGroup sensor:(SynchronousWindowSensor new device:device).
].
windowGroup setProcess:Processor activeProcess.
@@ -338,76 +338,76 @@
in the context where the raise actually occured.
"
exitAction == #step ifTrue:[
- selection := 1.
- steppedContextAddress notNil ifTrue:[
- "
- if we came here by a big-step, show the method where we are
- "
- (ObjectMemory addressOf:aContext) == steppedContextAddress ifTrue:[
- selection := 1
- ] ifFalse:[
- (ObjectMemory addressOf:aContext sender) == steppedContextAddress ifTrue:[
- selection := 2
- ]
- ].
- "
- for bigStep, we could also be in a block below the actual method ...
- "
- (aContext home notNil and:[
- (ObjectMemory addressOf:aContext home) == steppedContextAddress]) ifTrue:[
- selection := 1
- ] ifFalse:[
- (aContext sender home notNil and:[
- (ObjectMemory addressOf:aContext sender home) == steppedContextAddress]) ifTrue:[
- selection := 2
- ]
- ].
- ]
+ selection := 1.
+ steppedContextAddress notNil ifTrue:[
+ "
+ if we came here by a big-step, show the method where we are
+ "
+ (ObjectMemory addressOf:aContext) == steppedContextAddress ifTrue:[
+ selection := 1
+ ] ifFalse:[
+ (ObjectMemory addressOf:aContext sender) == steppedContextAddress ifTrue:[
+ selection := 2
+ ]
+ ].
+ "
+ for bigStep, we could also be in a block below the actual method ...
+ "
+ (aContext home notNil and:[
+ (ObjectMemory addressOf:aContext home) == steppedContextAddress]) ifTrue:[
+ selection := 1
+ ] ifFalse:[
+ (aContext sender home notNil and:[
+ (ObjectMemory addressOf:aContext sender home) == steppedContextAddress]) ifTrue:[
+ selection := 2
+ ]
+ ].
+ ]
] ifFalse:[
- steppedContextAddress isNil ifTrue:[
- "
- preselect a more interesting context, (where halt/raise was ...)
- "
- selection := self interestingContextFrom:aContext.
- ] ifFalse:[
- "
- if we came here by a big-step, show the method where we are
- "
- (ObjectMemory addressOf:aContext) == steppedContextAddress ifTrue:[
- selection := 1
- ] ifFalse:[
- (ObjectMemory addressOf:aContext sender) == steppedContextAddress ifTrue:[
- selection := 2
- ]
- ]
- ]
+ steppedContextAddress isNil ifTrue:[
+ "
+ preselect a more interesting context, (where halt/raise was ...)
+ "
+ selection := self interestingContextFrom:aContext.
+ ] ifFalse:[
+ "
+ if we came here by a big-step, show the method where we are
+ "
+ (ObjectMemory addressOf:aContext) == steppedContextAddress ifTrue:[
+ selection := 1
+ ] ifFalse:[
+ (ObjectMemory addressOf:aContext sender) == steppedContextAddress ifTrue:[
+ selection := 2
+ ]
+ ]
+ ]
].
selection notNil ifTrue:[
- self showSelection:selection.
- contextView selection:selection.
- selection > 1 ifTrue:[
- contextView scrollToLine:(selection - 1)
- ]
+ self showSelection:selection.
+ contextView selection:selection.
+ selection > 1 ifTrue:[
+ contextView scrollToLine:(selection - 1)
+ ]
].
m := contextView middleButtonMenu.
m notNil ifTrue:[
- canAbort := inspecting or:[Object abortSignal isHandled].
- canAbort ifTrue:[
- abortButton enable.
- m enable:#doAbort.
- ] ifFalse:[
- abortButton disable.
- m disable:#doAbort.
- ].
- exclusive ifTrue:[
- terminateButton disable.
- m disable:#doTerminate.
- ] ifFalse:[
- terminateButton enable.
- m enable:#doTerminate.
- ]
+ canAbort := inspecting or:[Object abortSignal isHandled].
+ canAbort ifTrue:[
+ abortButton enable.
+ m enable:#doAbort.
+ ] ifFalse:[
+ abortButton disable.
+ m disable:#doAbort.
+ ].
+ exclusive ifTrue:[
+ terminateButton disable.
+ m disable:#doTerminate.
+ ] ifFalse:[
+ terminateButton enable.
+ m enable:#doTerminate.
+ ]
].
"
@@ -417,13 +417,13 @@
position again
"
drawableId notNil ifTrue:[
- self rerealize
+ self rerealize
] ifFalse:[
- self realize.
+ self realize.
].
exclusive ifTrue:[
- self showError:'
+ self showError:'
Debugging system process `' , (inspectedProcess nameOrId) printString , '''.
This is a modal debugger - all event processing is stopped..
@@ -449,10 +449,10 @@
"
[self controlLoop] valueOnUnwindDo:[
- windowGroup notNil ifTrue:[
- windowGroup setProcess:nil.
- ].
- self destroy
+ windowGroup notNil ifTrue:[
+ windowGroup setProcess:nil.
+ ].
+ self destroy
].
"
@@ -465,33 +465,33 @@
contextView contents:nil.
(exitAction ~~ #step) ifTrue:[
- receiverInspector release.
- contextInspector release.
+ receiverInspector release.
+ contextInspector release.
- self unrealize.
- device flush.
+ self unrealize.
+ device flush.
- (exitAction == #abort) ifTrue:[
- self cacheMyself.
- "
- have to catch errors occuring in unwind-blocks
- "
- Object errorSignal handle:[:ex |
- 'ignored error while unwinding: ' errorPrint.
- ex errorString errorPrintNL.
- ex proceed
- ] do:[
- Object abortSignal raise.
- ].
- 'abort failed' errorPrintNL
- ].
+ (exitAction == #abort) ifTrue:[
+ self cacheMyself.
+ "
+ have to catch errors occuring in unwind-blocks
+ "
+ ErrorSignal handle:[:ex |
+ 'ignored error while unwinding: ' errorPrint.
+ ex errorString errorPrintNL.
+ ex proceed
+ ] do:[
+ Object abortSignal raise.
+ ].
+ 'abort failed' errorPrintNL
+ ].
- (exitAction == #return) ifTrue:[
- selectedContext notNil ifTrue:[
- "
- if there is a selection in the codeView,
- evaluate it and use the result as return value
- "
+ (exitAction == #return) ifTrue:[
+ selectedContext notNil ifTrue:[
+ "
+ if there is a selection in the codeView,
+ evaluate it and use the result as return value
+ "
"/ disabled for now, there is almost always a selection (the current line)
"/ and that is syntactically incorrect ...
"/ ... leading to a popup warning from the codeView
@@ -507,112 +507,112 @@
"/ ].
"/ ].
- con := selectedContext.
- self cacheMyself.
- "
- have to catch errors occuring in unwind-blocks
- "
- Object errorSignal handle:[:ex |
- 'ignored error while unwinding: ' errorPrint.
- ex errorString errorPrintNL.
- ex proceed
- ] do:[
- con unwind:retval.
- ].
- 'cannot return from selected context' errorPrintNL
- ]
- ].
+ con := selectedContext.
+ self cacheMyself.
+ "
+ have to catch errors occuring in unwind-blocks
+ "
+ Object errorSignal handle:[:ex |
+ 'ignored error while unwinding: ' errorPrint.
+ ex errorString errorPrintNL.
+ ex proceed
+ ] do:[
+ con unwind:retval.
+ ].
+ 'cannot return from selected context' errorPrintNL
+ ]
+ ].
- (exitAction == #restart) ifTrue:[
- selectedContext notNil ifTrue:[
- con := selectedContext.
- self cacheMyself.
- "
- have to catch errors occuring in unwind-blocks
- "
- Object errorSignal handle:[:ex |
- 'ignored error while unwinding: ' errorPrint.
- ex errorString errorPrintNL.
- ex proceed
- ] do:[
- con unwindAndRestart.
- ].
- 'cannot restart selected context' errorPrintNL
- ]
- ].
+ (exitAction == #restart) ifTrue:[
+ selectedContext notNil ifTrue:[
+ con := selectedContext.
+ self cacheMyself.
+ "
+ have to catch errors occuring in unwind-blocks
+ "
+ Object errorSignal handle:[:ex |
+ 'ignored error while unwinding: ' errorPrint.
+ ex errorString errorPrintNL.
+ ex proceed
+ ] do:[
+ con unwindAndRestart.
+ ].
+ 'cannot restart selected context' errorPrintNL
+ ]
+ ].
- (exitAction == #quickTerminate) ifTrue:[
- self cacheMyself.
- Processor activeProcess terminateNoSignal
- ].
+ (exitAction == #quickTerminate) ifTrue:[
+ self cacheMyself.
+ Processor activeProcess terminateNoSignal
+ ].
- (exitAction == #terminate) ifTrue:[
- self cacheMyself.
- "
- have to catch errors occuring in unwind-blocks
- "
- Object errorSignal handle:[:ex |
- 'ignored error while unwinding: ' errorPrint.
- ex errorString errorPrintNL.
- ex proceed
- ] do:[
- Processor activeProcess terminate.
- ].
- 'cannot terminate process' errorPrintNL
- ]
+ (exitAction == #terminate) ifTrue:[
+ self cacheMyself.
+ "
+ have to catch errors occuring in unwind-blocks
+ "
+ Object errorSignal handle:[:ex |
+ 'ignored error while unwinding: ' errorPrint.
+ ex errorString errorPrintNL.
+ ex proceed
+ ] do:[
+ Processor activeProcess terminate.
+ ].
+ 'cannot terminate process' errorPrintNL
+ ]
].
selectedContext := actualContext := nil.
grabber notNil ifTrue:[
- device grabPointerInView:grabber.
- grabber := nil.
+ device grabPointerInView:grabber.
+ grabber := nil.
].
(exitAction == #step) ifTrue:[
- "
- schedule another stepInterrupt
- - must enter myself into the collection of open debuggers,
- in case the stepping process comes back again via a halt or signal
- before the step is finished. In this case, the stepping debugger should
- come up (instead of a new one)
- - must flush caches since optimized methods not always
- look for pending interrupts
- "
- OpenDebuggers isNil ifTrue:[
- OpenDebuggers := WeakArray with:self
- ] ifFalse:[
- (OpenDebuggers includes:self) ifFalse:[
- idx := OpenDebuggers identityIndexOf:nil.
- idx ~~ 0 ifTrue:[
- OpenDebuggers at:idx put:self
- ] ifFalse:[
- OpenDebuggers := OpenDebuggers copyWith:self
- ]
- ]
- ].
- self label:'single stepping - please wait ...'.
- stepping := true.
+ "
+ schedule another stepInterrupt
+ - must enter myself into the collection of open debuggers,
+ in case the stepping process comes back again via a halt or signal
+ before the step is finished. In this case, the stepping debugger should
+ come up (instead of a new one)
+ - must flush caches since optimized methods not always
+ look for pending interrupts
+ "
+ OpenDebuggers isNil ifTrue:[
+ OpenDebuggers := WeakArray with:self
+ ] ifFalse:[
+ (OpenDebuggers includes:self) ifFalse:[
+ idx := OpenDebuggers identityIndexOf:nil.
+ idx ~~ 0 ifTrue:[
+ OpenDebuggers at:idx put:self
+ ] ifFalse:[
+ OpenDebuggers := OpenDebuggers copyWith:self
+ ]
+ ]
+ ].
+ self label:'single stepping - please wait ...'.
+ stepping := true.
- ObjectMemory stepInterruptHandler:self.
- stepForReturn == true ifFalse:[
- ObjectMemory flushInlineCaches.
- StepInterruptPending := 1.
- InterruptPending := 1.
- InStepInterrupt := nil
- ]
+ ObjectMemory stepInterruptHandler:self.
+ stepForReturn == true ifFalse:[
+ ObjectMemory flushInlineCaches.
+ StepInterruptPending := 1.
+ InterruptPending := 1.
+ InStepInterrupt := nil
+ ]
] ifFalse:[
- OpenDebuggers notNil ifTrue:[
- idx := OpenDebuggers identityIndexOf:self.
- idx ~~ 0 ifTrue:[
- OpenDebuggers at:idx put:nil
- ]
- ].
- self cacheMyself.
+ OpenDebuggers notNil ifTrue:[
+ idx := OpenDebuggers identityIndexOf:self.
+ idx ~~ 0 ifTrue:[
+ OpenDebuggers at:idx put:nil
+ ]
+ ].
+ self cacheMyself.
]
"Created: 24.11.1995 / 19:52:54 / cg"
- "Modified: 22.12.1995 / 23:30:52 / cg"
+ "Modified: 20.2.1996 / 20:12:22 / cg"
!
openOn:aProcess
@@ -2440,5 +2440,5 @@
!DebugView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.66 1996-01-23 16:37:18 ah Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.67 1996-02-20 20:42:45 cg Exp $'
! !