--- a/DebugView.st Fri Oct 22 12:38:19 2010 +0200
+++ b/DebugView.st Fri Oct 22 13:53:56 2010 +0200
@@ -496,13 +496,69 @@
(countOrNil notNil and:[countOrNil > 0]) ifTrue:[
ign ignoreCount:countOrNil.
].
-
(dTOrNil notNil) ifTrue:[
ign ignoreEndTime:(Timestamp now + dTOrNil).
].
IgnoredHalts add:ign.
].
Smalltalk changed:#ignoredHalts.
+
+ "Modified: / 22-10-2010 / 13:52:02 / cg"
+!
+
+isHaltToBeIgnored
+ |c haltingMethod lineNrInHaltingMethod|
+
+ "/ should a halt be ignored ?
+ IgnoredHalts isNil ifTrue:[^ false].
+
+ "/ look for a breakpoint-wrapper's context
+ c := thisContext findNextContextWithSelector:#doRaise or:nil or:nil.
+ c notNil ifTrue:[
+ (c receiver isKindOf:NoHandlerError) ifTrue:[
+ c := c sender findNextContextWithSelector:#doRaise or:nil or:nil.
+ ].
+ (c receiver isKindOf:BreakPointInterrupt) ifFalse:[
+ c := nil
+ ] ifTrue:[
+ [ (c sender receiver isKindOf:BreakPointInterrupt)
+ or:[ c sender receiver == BreakPointInterrupt ]] whileTrue:[
+ c := c sender
+ ].
+ [ c sender isBlockContext ] whileTrue:[
+ c := c sender
+ ].
+ ].
+ ].
+
+ c isNil ifTrue:[
+ "/ look for halts or explicit breakpoints
+ c := thisContext findNextContextWithSelector:#halt or:#halt: or:nil.
+ c isNil ifTrue:[
+ c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil.
+ c isNil ifTrue:[
+ ^ false
+ ].
+ ].
+ ].
+
+ c := c sender.
+ haltingMethod := c method.
+
+ haltingMethod isWrapped ifTrue:[
+ lineNrInHaltingMethod := 1.
+ ] ifFalse:[
+ lineNrInHaltingMethod := c lineNumber.
+ "/ Transcript showCR:c.
+ ].
+
+ ^ self
+ isHaltToBeIgnoredIn:haltingMethod
+ atLineNr:lineNrInHaltingMethod
+ modifyEntryCount:true.
+
+ "Created: / 22-10-2010 / 12:09:53 / cg"
+ "Modified: / 22-10-2010 / 13:51:25 / cg"
!
isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod
@@ -529,16 +585,18 @@
^ true.
].
].
+
IgnoredHalts := IgnoredHalts
select:[:ign |
- ign isActive
- and:[ (ign isForMethod:haltingMethod line:lineNrInHaltingMethod) not ]
+ ign isActive and:[ (ign isForMethod:haltingMethod line:lineNrInHaltingMethod) not ]
].
IgnoredHalts isEmpty ifTrue:[
IgnoredHalts := nil.
].
^ false.
+
+ "Modified: / 22-10-2010 / 13:51:45 / cg"
!
removeInactiveIgnores
@@ -661,6 +719,19 @@
label: 'Continue'
itemValue: doContinue
translateLabel: true
+ shortcutKey: Cmdc
+ )
+ (MenuItem
+ label: 'Next (Line-Step)'
+ itemValue: doNext
+ translateLabel: true
+ shortcutKey: Cmdn
+ )
+ (MenuItem
+ label: 'Step'
+ itemValue: doStep
+ translateLabel: true
+ shortcutKey: Cmds
)
(MenuItem
label: '-'
@@ -669,6 +740,7 @@
label: 'Abort'
itemValue: doAbort
translateLabel: true
+ shortcutKey: Cmdx
)
(MenuItem
enabled: abortAllIsHandled
@@ -916,8 +988,6 @@
nil
nil
)
-
- "Modified: / 19-10-2010 / 12:59:06 / cg"
! !
!DebugView class methodsFor:'misc'!
@@ -1271,7 +1341,7 @@
"/'initial: ' print. initialSelectionOrNil printCR.
thisContext sender fixAllLineNumbers. "/ _CONTEXTLINENOS(s)
- self isHaltToBeIgnored ifTrue:[
+ self class isHaltToBeIgnored ifTrue:[
^ self.
].
@@ -1550,7 +1620,7 @@
"Modified: / 17-04-1997 / 13:01:32 / stefan"
"Created: / 30-10-1997 / 21:08:18 / cg"
"Modified: / 13-10-1998 / 19:56:59 / ps"
- "Modified: / 28-07-2007 / 12:12:03 / cg"
+ "Modified: / 22-10-2010 / 12:10:09 / cg"
!
exit_abort
@@ -4617,7 +4687,7 @@
|haltingContext haltingMethod lineNrOfHalt|
haltingContext := self findHaltingContext.
- haltingContext isNil ifTrue:[ ^ self ].
+ haltingContext isNil ifTrue:[ Transcript showCR:'no halting context found'. ^ self ].
haltingMethod := haltingContext method.
lineNrOfHalt := haltingContext lineNumber.
@@ -4626,7 +4696,7 @@
ignoreHaltIn:haltingMethod at:lineNrOfHalt
forCount:countOrNil orTimeDuration:dTOrNil
- "Modified: / 20-10-2010 / 10:18:19 / cg"
+ "Modified: / 22-10-2010 / 13:50:47 / cg"
!
busy
@@ -5177,29 +5247,6 @@
^ exitAction == #abort
!
-isHaltToBeIgnored
- |c haltingMethod lineNrInHaltingMethod|
-
- "/ should a halt be ignored ?
- IgnoredHalts isNil ifTrue:[^ false].
-
- c := thisContext findNextContextWithSelector:#halt or:#halt: or:nil.
- c isNil ifTrue:[
- c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil.
- ].
- c isNil ifTrue:[^ false].
-
- c := c sender.
- haltingMethod := c method.
- lineNrInHaltingMethod := c lineNumber.
- "/ Transcript showCR:c.
-
- ^ self class
- isHaltToBeIgnoredIn:haltingMethod
- atLineNr:lineNrInHaltingMethod
- modifyEntryCount:true.
-!
-
setOfHiddenCallingSelectors
^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' )
!
@@ -6882,14 +6929,18 @@
^ nil
].
].
- ^ m
+ ^ m
+
+ "Modified: / 22-10-2010 / 13:50:29 / cg"
!
method:methodArg lineNumber:lineNumberArg
- self assert:(methodArg mclass notNil).
+ "/ self assert:(methodArg mclass notNil).
weakMethodHolder := WeakArray with:methodArg.
lineNumber := lineNumberArg.
+
+ "Modified: / 22-10-2010 / 12:01:19 / cg"
! !
!DebugView::IgnoredHalt methodsFor:'misc'!
@@ -6909,6 +6960,7 @@
aStream nextPutAll:'an obsolete IgnoredHalt'.
^ self
].
+
aStream nextPutAll:'Ignore '.
self method printOn:aStream.
ignoreEndTime notNil ifTrue:[
@@ -6926,6 +6978,8 @@
].
].
].
+
+ "Modified: / 22-10-2010 / 13:34:20 / cg"
! !
!DebugView::IgnoredHalt methodsFor:'queries'!
@@ -6993,11 +7047,11 @@
!DebugView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.506 2010-10-20 09:04:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.507 2010-10-22 11:53:56 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.506 2010-10-20 09:04:28 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.507 2010-10-22 11:53:56 cg Exp $'
! !
DebugView initialize!