diff -r dab2fdc4a811 -r 26d452e40e52 DebugView.st --- a/DebugView.st Tue Oct 22 12:41:16 1996 +0200 +++ b/DebugView.st Tue Oct 22 13:57:13 1996 +0200 @@ -19,7 +19,7 @@ restartButton exclusive inspecting nChainShown inspectedProcess updateProcess stopButton updateButton monitorToggle stepping steppedContextLineno stepForReturn actualContext inWrap - stackInspector steppedContext' + stackInspector steppedContext wrapperContext' classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail DebuggingDebugger' poolDictionaries:'' @@ -789,7 +789,7 @@ catchBlock := nil. contextArray := nil. selectedContext := actualContext := nil. - steppedContext := nil. + steppedContext := wrapperContext := nil. (exitAction == #terminate) ifTrue:[ aProcess terminate. @@ -802,7 +802,7 @@ ]. self open - "Modified: 21.10.1996 / 13:43:05 / cg" + "Modified: 22.10.1996 / 11:58:53 / cg" ! ! !DebugView methodsFor:'help'! @@ -1156,7 +1156,8 @@ stepOrNext |where here s isWrap method lastWrappedConAddr wrappedMethod - inBlock left ignore contextBelow lastWrappedContext| + inBlock left ignore contextBelow lastWrappedContext + leftWrap enteredWrap| skipLineNr == #return ifTrue:[ name := Processor activeProcess nameOrId. @@ -1199,14 +1200,14 @@ 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. - + leftWrap := enteredWrap := false. + + where := here. inWrap ifTrue:[ wrappedMethod := nil. 5 timesRepeat:[ -"/ where selector printNL. (where notNil and:[where isBlockContext not]) ifTrue:[ method := where method. (method notNil and:[method isWrapped]) ifTrue:[ @@ -1221,13 +1222,17 @@ ] ] ifFalse:[ where == steppedContext ifTrue:[ -"/DebuggingDebugger ifTrue:[ -"/ 'change stepCon from: ' print. -"/ steppedContext print. -"/ ' to: ' print. -"/ lastWrappedContext printNL. -"/]. + + DebuggingDebugger ifTrue:[ + 'change stepCon from: ' print. + steppedContext print. + ' to lastWrapped: ' print. + lastWrappedContext printNL. + ]. + inWrap := false. + leftWrap := true. + wrapperContext := steppedContext. steppedContext := lastWrappedContext ] ] @@ -1249,7 +1254,9 @@ ObjectMemory flushInlineCaches. skipLineNr == #return ifTrue:[ - 'skipRet in wrap' printCR. + DebuggingDebugger ifTrue:[ + 'skipRet in wrap' printCR. + ] ]. StepInterruptPending := 1. @@ -1382,10 +1389,60 @@ " a send " + DebuggingDebugger ifTrue:[ + 'clear steppedContext' printCR. + ]. steppedContext := nil. s := 'after send' ]. + ignore := false. + + " + kludge to hide breakpoint wrappers in the context list: + check if we are in a wrapper methods hidden exit-sequence + if so, ignore the interrupt and continue single sending + " + (where isNil + and:[wrapperContext notNil]) + ifTrue:[ + "/ did not find our steppedContext along the chain; + "/ could be in a wrappedMethods exitBlock ... + + leftWrap ifFalse:[ + where := here. + wrappedMethod := nil. + 5 timesRepeat:[ + where notNil ifTrue:[ + where isBlockContext ifFalse:[ + method := where method. + (method notNil and:[method isWrapped]) ifTrue:[ + where == wrapperContext ifTrue:[ + DebuggingDebugger ifTrue:[ + 'change stepCon fromWrapped: ' print. + steppedContext print. + ' to: ' print. + wrapperContext printNL. + ]. + + inWrap := true. + enteredWrap := true. + steppedContext := wrapperContext. + wrapperContext := nil. + ] + ]. + ]. + where := where sender + ] + ]. + ]. + enteredWrap ifTrue:[ + ignore := true + ] + ]. + + "/ + left ifTrue:[ "/ special care for stepInterrupt in send, "/ when created a dummy context (lineNr == 1) @@ -1412,35 +1469,36 @@ ]. ]. - ignore := false. - - (bigStep - and:[steppedContextLineno notNil - and:[where notNil - and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ - DebuggingDebugger == true ifTrue:[ - 'same line - ignored' printNL. + ignore ifFalse:[ + + (bigStep + and:[steppedContextLineno notNil + and:[where notNil + and:[where lineNumber == steppedContextLineno]]]) ifTrue:[ + DebuggingDebugger == true ifTrue:[ + 'same line - ignored' printNL. + ]. + ignore := true ]. - ignore := true - ]. - - (left not - and:[skipLineNr notNil - and:[where notNil - and:[where lineNumber < skipLineNr]]]) ifTrue:[ - DebuggingDebugger == true ifTrue:[ - 'skip (' print. skipLineNr print. ' unreached - ignored' printNL. + + (left not + and:[skipLineNr notNil + and:[where notNil + and:[where lineNumber < skipLineNr]]]) ifTrue:[ + DebuggingDebugger == true ifTrue:[ + 'skip (' print. skipLineNr print. ' unreached - ignored' printNL. + ]. + ignore := true ]. - ignore := true - ]. - - (steppedContextLineno isNil - and:[skipLineNr isNil - and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ - DebuggingDebugger == true ifTrue:[ - 'same line2 (after conIRQ) - ignored' printNL. + + (steppedContextLineno isNil + and:[skipLineNr isNil + and:[thisContext sender selector == #contextInterrupt]]) ifTrue:[ + DebuggingDebugger == true ifTrue:[ + 'same line2 (after conIRQ) - ignored' printNL. + ]. + ignore := true ]. - ignore := true ]. ignore ifTrue:[ @@ -1470,10 +1528,11 @@ "release refs to context" where := nil. here := nil. "/'enter' printCR. + self enter:thisContext sender sender "Created: 14.10.1996 / 12:53:39 / cg" - "Modified: 22.10.1996 / 11:31:44 / cg" + "Modified: 22.10.1996 / 12:54:33 / cg" ! ! !DebugView methodsFor:'menu / button actions'! @@ -1594,7 +1653,7 @@ ^ self ]. - steppedContext := nil. + steppedContext := wrapperContext := nil. haveControl := false. exitAction := #abort. @@ -1609,7 +1668,7 @@ ^ self. - "Modified: 21.10.1996 / 13:47:28 / cg" + "Modified: 22.10.1996 / 11:59:21 / cg" ! doContinue @@ -1627,7 +1686,7 @@ ^ self ]. canContinue ifTrue:[ - steppedContext := nil. + steppedContext := wrapperContext := nil. tracing := false. haveControl := false. exitAction := #continue. @@ -1647,7 +1706,7 @@ ] ] - "Modified: 21.10.1996 / 13:47:31 / cg" + "Modified: 22.10.1996 / 11:59:24 / cg" ! doNext @@ -1675,7 +1734,7 @@ ^ self ]. - steppedContext := nil. + steppedContext := wrapperContext := nil. haveControl := false. exitAction := #restart. @@ -1686,7 +1745,7 @@ 'DEBUGGER: oops, restart failed' errorPrintNL. restartButton turnOff. - "Modified: 21.10.1996 / 13:47:35 / cg" + "Modified: 22.10.1996 / 11:59:28 / cg" ! doReturn @@ -1700,7 +1759,7 @@ ^ self ]. - steppedContext := nil. + steppedContext := wrapperContext := nil. haveControl := false. exitAction := #return. @@ -1711,7 +1770,7 @@ 'DEBUGGER: oops, return failed' errorPrintNL. returnButton turnOff. - "Modified: 21.10.1996 / 13:47:38 / cg" + "Modified: 22.10.1996 / 11:59:31 / cg" ! doSend @@ -1720,7 +1779,7 @@ inspecting ifTrue:[^ self]. canContinue ifTrue:[ - steppedContext := nil. + steppedContext := wrapperContext := nil. haveControl := false. exitAction := #step. @@ -1732,7 +1791,7 @@ sendButton turnOff. ] - "Modified: 21.10.1996 / 13:47:41 / cg" + "Modified: 22.10.1996 / 11:59:33 / cg" ! doStep @@ -1766,6 +1825,7 @@ ]. steppedContext := con. + wrapperContext := nil. " if we step in a wrapped method, @@ -1797,7 +1857,7 @@ sendButton turnOff. ] - "Modified: 21.10.1996 / 13:47:49 / cg" + "Modified: 22.10.1996 / 11:59:42 / cg" ! doStop @@ -1826,7 +1886,7 @@ ^ self ]. - steppedContext := nil. + steppedContext := wrapperContext := nil. haveControl := false. exitAction := #terminate. @@ -1840,7 +1900,7 @@ ]. terminateButton turnOff. - "Modified: 21.10.1996 / 13:48:00 / cg" + "Modified: 22.10.1996 / 11:59:45 / cg" ! doTrace @@ -1914,7 +1974,7 @@ ^ self ]. - steppedContext := nil. + steppedContext := wrapperContext := nil. haveControl := false. exitAction := #quickTerminate. @@ -1928,7 +1988,7 @@ ]. terminateButton turnOff. - "Modified: 21.10.1996 / 13:48:05 / cg" + "Modified: 22.10.1996 / 11:59:49 / cg" ! removeAllBreakpoints @@ -2024,14 +2084,14 @@ exitAction := nil. contextArray := nil. selectedContext := actualContext := nil. - steppedContext := nil. + steppedContext := wrapperContext := nil. catchBlock := nil. grabber := nil. self autoUpdateOff. exclusive ifTrue:[CachedExclusive := self] ifFalse:[CachedDebugger := self]. - "Modified: 21.10.1996 / 13:42:45 / cg" + "Modified: 22.10.1996 / 11:59:53 / cg" ! exclusive:aBoolean @@ -2327,10 +2387,10 @@ unstep stepping := false. bigStep := false. - steppedContext := nil. + steppedContext := wrapperContext := nil. exitAction := nil - "Modified: 21.10.1996 / 13:47:53 / cg" + "Modified: 22.10.1996 / 11:59:57 / cg" ! updateContext @@ -2601,13 +2661,13 @@ exitAction := nil. contextArray := nil. selectedContext := actualContext := nil. - steppedContext := nil. + steppedContext := wrapperContext := nil. grabber := nil. self autoUpdateOff. super destroy "/ 1.12.94 - "Modified: 21.10.1996 / 13:43:40 / cg" + "Modified: 22.10.1996 / 12:00:00 / cg" ! showSelection:lineNr @@ -2890,5 +2950,5 @@ !DebugView class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.108 1996-10-22 10:41:16 cg Exp $' + ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.109 1996-10-22 11:57:13 cg Exp $' ! !