--- a/DebugView.st Mon Oct 21 11:57:53 1996 +0200
+++ b/DebugView.st Mon Oct 21 15:58:25 1996 +0200
@@ -19,7 +19,7 @@
restartButton exclusive inspecting nChainShown inspectedProcess
updateProcess stopButton updateButton monitorToggle stepping
steppedContextLineno stepForReturn actualContext inWrap
- stackInspector'
+ stackInspector steppedContext'
classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail
DebuggingDebugger'
poolDictionaries:''
@@ -378,32 +378,32 @@
"
exitAction == #step ifTrue:[
selection := 1.
- steppedContextAddress notNil ifTrue:[
+ steppedContext notNil ifTrue:[
"
if we came here by a big-step, show the method where we are
"
- (ObjectMemory addressOf:aContext) == steppedContextAddress ifTrue:[
+ aContext == steppedContext ifTrue:[
selection := 1
] ifFalse:[
- (ObjectMemory addressOf:aContext sender) == steppedContextAddress ifTrue:[
+ aContext sender == steppedContext 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:[
+ (aContext home notNil
+ and:[aContext home == steppedContext]) ifTrue:[
selection := 1
] ifFalse:[
- (aContext sender home notNil and:[
- (ObjectMemory addressOf:aContext sender home) == steppedContextAddress]) ifTrue:[
+ (aContext sender home notNil
+ and:[aContext sender home == steppedContext]) ifTrue:[
selection := 2
]
].
]
] ifFalse:[
- steppedContextAddress isNil ifTrue:[
+ steppedContext isNil ifTrue:[
"
preselect a more interesting context, (where halt/raise was ...)
"
@@ -412,10 +412,10 @@
"
if we came here by a big-step, show the method where we are
"
- (ObjectMemory addressOf:aContext) == steppedContextAddress ifTrue:[
+ aContext == steppedContext ifTrue:[
selection := 1
] ifFalse:[
- (ObjectMemory addressOf:aContext sender) == steppedContextAddress ifTrue:[
+ aContext sender == steppedContext ifTrue:[
selection := 2
]
]
@@ -698,7 +698,7 @@
"Created: 24.11.1995 / 19:52:54 / cg"
"Modified: 3.5.1996 / 23:58:16 / stefan"
- "Modified: 20.10.1996 / 16:47:09 / cg"
+ "Modified: 21.10.1996 / 13:45:43 / cg"
!
openOn:aProcess
@@ -789,6 +789,8 @@
catchBlock := nil.
contextArray := nil.
selectedContext := actualContext := nil.
+ steppedContext := nil.
+
(exitAction == #terminate) ifTrue:[
aProcess terminate.
].
@@ -800,7 +802,7 @@
].
self open
- "Modified: 20.10.1996 / 18:31:14 / cg"
+ "Modified: 21.10.1996 / 13:43:05 / cg"
! !
!DebugView methodsFor:'help'!
@@ -1154,7 +1156,7 @@
stepOrNext
|where here s isWrap method lastWrappedConAddr wrappedMethod
- inBlock left ignore contextBelow|
+ inBlock left ignore contextBelow lastWrappedContext|
skipLineNr == #return ifTrue:[
name := Processor activeProcess nameOrId.
@@ -1180,11 +1182,6 @@
^ self
].
- "
- kludge to hide breakpoint wrappers in the context list:
- check if we are in a wrapper methods hidden setup-sequence
- if so, ignore the interrupt and continue single sending
- "
here := thisContext. "stepInterrupt"
here := here sender. "the caller; step- or contextIRQ"
here := here sender. "the interrupted context"
@@ -1196,6 +1193,11 @@
here selector printNL.
].
+ "
+ kludge to hide breakpoint wrappers in the context list:
+ check if we are in a wrapper methods hidden setup-sequence
+ if so, ignore the interrupt and continue single sending
+ "
where := here.
isWrap := false.
left := false.
@@ -1212,19 +1214,19 @@
"
wrappedMethod ~~ method ifTrue:[
wrappedMethod := method.
- lastWrappedConAddr := ObjectMemory addressOf:where.
+ lastWrappedContext := where.
where sender receiver == method originalMethod ifFalse:[
isWrap := true.
]
] ifFalse:[
- (ObjectMemory addressOf:where) == steppedContextAddress ifTrue:[
+ where == steppedContext ifTrue:[
"/ 'change stepCon from: ' print.
"/ (steppedContextAddress printStringRadix:16)print.
"/ ' to: ' print.
"/ (lastWrappedConAddr printStringRadix:16)printNL.
inWrap := false.
- steppedContextAddress := lastWrappedConAddr
+ steppedContext := lastWrappedContext
]
]
].
@@ -1270,17 +1272,17 @@
"/
"/ in a block called by 'our' context ?
"/
- (ObjectMemory addressOf:where home) == steppedContextAddress ifTrue:[
+ where home == steppedContext ifTrue:[
"/ '*block*' printNL.
inBlock := true
]
].
- (ObjectMemory addressOf:where) == steppedContextAddress ifFalse:[
+ where == steppedContext ifFalse:[
where := where sender.
- where home notNil ifTrue:[
- (ObjectMemory addressOf:where home) == steppedContextAddress ifTrue:[
+ where notNil ifTrue:[
+ where home == steppedContext ifTrue:[
"/ '*block*' printNL.
inBlock := true.
]
@@ -1289,7 +1291,7 @@
"/ 'looking for ' print.
"/ (steppedContextAddress printStringRadix:16)print. '' printNL.
- (ObjectMemory addressOf:where) == steppedContextAddress ifFalse:[
+ where == steppedContext ifFalse:[
"
check if we are in a context below steppedContext
(i.e. if steppedContext can be reached from
@@ -1304,7 +1306,7 @@
where selector printNL.
].
- (ObjectMemory addressOf:where) == steppedContextAddress ifTrue:[
+ where == steppedContext ifTrue:[
"/ 'found it - below; ignore' printNL.
"
found the interesting context somwehere up in the
@@ -1321,18 +1323,32 @@
look for pending interrupts
"
ObjectMemory flushInlineCaches.
- contextBelow notNil ifTrue:[
+ (contextBelow notNil
+ and:[inBlock not]) ifTrue:[
"/ 'prepare for unwind-catch' printNL.
"/ 'con= ' print. contextBelow printCR.
+ DebuggingDebugger == true ifTrue:[
+ 'below stepCon; continue until unwind of: ' print.
+ contextBelow printCR.
+ ].
Processor activeProcess forceInterruptOnReturnOf:contextBelow.
StepInterruptPending := nil.
] ifFalse:[
+ DebuggingDebugger == true ifTrue:[
+ 'below stepCon; continue single stepping' printCR.
+ ].
StepInterruptPending := 1.
InterruptPending := 1.
].
InStepInterrupt := nil.
+
^ nil
].
+
+ where home == steppedContext ifTrue:[
+ inBlock := true.
+ ].
+
contextBelow := where.
where := where sender
].
@@ -1352,7 +1368,7 @@
"
a send
"
- steppedContextAddress := nil.
+ steppedContext := nil.
s := 'after send'
].
@@ -1375,21 +1391,27 @@
and:[steppedContextLineno notNil
and:[where notNil
and:[where lineNumber == steppedContextLineno]]]) ifTrue:[
-"/ 'same line - ignored' printNL.
+ DebuggingDebugger == true ifTrue:[
+ 'same line - ignored' printNL.
+ ].
ignore := true
].
(left not
and:[skipLineNr notNil
and:[where lineNumber < skipLineNr]]) ifTrue:[
-"/ 'skip (' print. skipLineNr print. ' unreached - ignored' printNL.
+ DebuggingDebugger == true ifTrue:[
+ 'skip (' print. skipLineNr print. ' unreached - ignored' printNL.
+ ].
ignore := true
].
(steppedContextLineno isNil
and:[skipLineNr isNil
and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[
-"/ 'same line2 (after conIRQ) - ignored' printNL.
+ DebuggingDebugger == true ifTrue:[
+ 'same line2 (after conIRQ) - ignored' printNL.
+ ].
ignore := true
].
@@ -1423,7 +1445,7 @@
self enter:thisContext sender sender
"Created: 14.10.1996 / 12:53:39 / cg"
- "Modified: 14.10.1996 / 14:57:41 / cg"
+ "Modified: 21.10.1996 / 14:13:17 / cg"
! !
!DebugView methodsFor:'menu / button actions'!
@@ -1544,7 +1566,7 @@
^ self
].
- steppedContextAddress := nil.
+ steppedContext := nil.
haveControl := false.
exitAction := #abort.
@@ -1559,7 +1581,7 @@
^ self.
- "Modified: 29.5.1996 / 13:18:39 / cg"
+ "Modified: 21.10.1996 / 13:47:28 / cg"
!
doContinue
@@ -1577,7 +1599,7 @@
^ self
].
canContinue ifTrue:[
- steppedContextAddress := nil.
+ steppedContext := nil.
tracing := false.
haveControl := false.
exitAction := #continue.
@@ -1597,7 +1619,7 @@
]
]
- "Modified: 20.10.1996 / 18:31:20 / cg"
+ "Modified: 21.10.1996 / 13:47:31 / cg"
!
doNext
@@ -1625,7 +1647,7 @@
^ self
].
- steppedContextAddress := nil.
+ steppedContext := nil.
haveControl := false.
exitAction := #restart.
@@ -1636,7 +1658,7 @@
'DEBUGGER: oops, restart failed' errorPrintNL.
restartButton turnOff.
- "Modified: 29.5.1996 / 13:18:55 / cg"
+ "Modified: 21.10.1996 / 13:47:35 / cg"
!
doReturn
@@ -1650,7 +1672,7 @@
^ self
].
- steppedContextAddress := nil.
+ steppedContext := nil.
haveControl := false.
exitAction := #return.
@@ -1661,7 +1683,7 @@
'DEBUGGER: oops, return failed' errorPrintNL.
returnButton turnOff.
- "Modified: 29.5.1996 / 13:19:12 / cg"
+ "Modified: 21.10.1996 / 13:47:38 / cg"
!
doSend
@@ -1670,7 +1692,7 @@
inspecting ifTrue:[^ self].
canContinue ifTrue:[
- steppedContextAddress := nil.
+ steppedContext := nil.
haveControl := false.
exitAction := #step.
@@ -1682,7 +1704,7 @@
sendButton turnOff.
]
- "Modified: 29.5.1996 / 13:19:23 / cg"
+ "Modified: 21.10.1996 / 13:47:41 / cg"
!
doStep
@@ -1715,7 +1737,7 @@
steppedContextLineno := skipLineNr := nil.
].
- steppedContextAddress := ObjectMemory addressOf:con.
+ steppedContext := con.
"
if we step in a wrapped method,
@@ -1747,7 +1769,7 @@
sendButton turnOff.
]
- "Modified: 14.10.1996 / 13:23:33 / cg"
+ "Modified: 21.10.1996 / 13:47:49 / cg"
!
doStop
@@ -1776,7 +1798,7 @@
^ self
].
- steppedContextAddress := nil.
+ steppedContext := nil.
haveControl := false.
exitAction := #terminate.
@@ -1790,7 +1812,7 @@
].
terminateButton turnOff.
- "Modified: 29.5.1996 / 13:19:57 / cg"
+ "Modified: 21.10.1996 / 13:48:00 / cg"
!
doTrace
@@ -1864,7 +1886,7 @@
^ self
].
- steppedContextAddress := nil.
+ steppedContext := nil.
haveControl := false.
exitAction := #quickTerminate.
@@ -1878,7 +1900,7 @@
].
terminateButton turnOff.
- "Modified: 29.5.1996 / 13:20:14 / cg"
+ "Modified: 21.10.1996 / 13:48:05 / cg"
!
removeAllBreakpoints
@@ -1961,7 +1983,7 @@
Otherwise, the GC will not be able to release it"
windowGroup notNil ifTrue:[
- windowGroup setProcess:nil.
+ windowGroup setProcess:nil.
].
busy := false.
@@ -1974,11 +1996,14 @@
exitAction := nil.
contextArray := nil.
selectedContext := actualContext := nil.
+ steppedContext := nil.
catchBlock := nil.
grabber := nil.
self autoUpdateOff.
exclusive ifTrue:[CachedExclusive := self] ifFalse:[CachedDebugger := self].
+
+ "Modified: 21.10.1996 / 13:42:45 / cg"
!
exclusive:aBoolean
@@ -2274,8 +2299,10 @@
unstep
stepping := false.
bigStep := false.
- steppedContextAddress := nil.
+ steppedContext := nil.
exitAction := nil
+
+ "Modified: 21.10.1996 / 13:47:53 / cg"
!
updateContext
@@ -2546,12 +2573,13 @@
exitAction := nil.
contextArray := nil.
selectedContext := actualContext := nil.
+ steppedContext := nil.
grabber := nil.
self autoUpdateOff.
super destroy "/ 1.12.94
- "Modified: 11.7.1996 / 17:36:52 / cg"
+ "Modified: 21.10.1996 / 13:43:40 / cg"
!
showSelection:lineNr
@@ -2834,5 +2862,5 @@
!DebugView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.105 1996-10-20 17:34:04 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.106 1996-10-21 13:58:25 cg Exp $'
! !