DebugView.st
changeset 12937 cf8330cc265e
parent 12929 89567fa780c5
child 12941 9605021cbfb8
equal deleted inserted replaced
12936:3624ecb36435 12937:cf8330cc265e
    38 	poolDictionaries:''
    38 	poolDictionaries:''
    39 	category:'Interface-Debugger'
    39 	category:'Interface-Debugger'
    40 !
    40 !
    41 
    41 
    42 Object subclass:#IgnoredHaltOrBreakpoint
    42 Object subclass:#IgnoredHaltOrBreakpoint
    43 	instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed'
    43 	instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed
       
    44 		ignoredReceiverClasses ignoredProcesses'
    44 	classVariableNames:''
    45 	classVariableNames:''
    45 	poolDictionaries:''
    46 	poolDictionaries:''
    46 	privateIn:DebugView
    47 	privateIn:DebugView
    47 !
    48 !
    48 
    49 
   234 hasIgnoredHalts
   235 hasIgnoredHalts
   235     self removeInactiveIgnores.
   236     self removeInactiveIgnores.
   236     ^ IgnoredHalts notEmptyOrNil
   237     ^ IgnoredHalts notEmptyOrNil
   237 !
   238 !
   238 
   239 
   239 ignoreBreakpointWithParameter:parameterOrNil forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
   240 ignoreBreakpointWithParameter:parameterOrNil forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey orReceiverClass:receiverClassOrNil orProcess:processOrNil
   240     "remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations
   241     "remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations
   241      or until some time has elapsed.
   242      or until some time has elapsed.
   242      With nil count and time arguments, such an ignored breakpoint is reactivated"
   243      With nil count and time arguments, such an ignored breakpoint is reactivated"
   243 
   244 
       
   245     self 
       
   246         ignoreHaltOrBreakpoint:#halt 
       
   247         method:nil line:nil  
       
   248         parameter:parameterOrNil 
       
   249         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
       
   250         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   251 !
       
   252 
       
   253 ignoreHaltIn:haltingMethod at:lineNrOfHalt forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   254     "remember to ignore a halt in some method for some number of invocations
       
   255      or until some time has elapsed.
       
   256      With nil count and time arguments, such an ignored halt is reactivated"
       
   257 
       
   258     self 
       
   259         ignoreHaltOrBreakpoint:#halt 
       
   260         method:haltingMethod line:lineNrOfHalt  
       
   261         parameter:nil 
       
   262         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
       
   263         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   264 !
       
   265 
       
   266 ignoreHaltOrBreakpoint:type method:methodOrNil line:lineNrOfHaltOrNil parameter:parameterOrNil 
       
   267         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
       
   268         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   269 
       
   270     "remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations
       
   271      or until some time has elapsed.
       
   272      With nil count and time arguments, such an ignored breakpoint is reactivated"
       
   273 
   244     |oldEntry ign|
   274     |oldEntry ign|
   245 
   275 
   246     IgnoredHalts notNil ifTrue:[
   276     IgnoredHalts notNil ifTrue:[
   247         self removeInactiveIgnores.
   277         self removeInactiveIgnores.
   248         oldEntry := IgnoredHalts
   278         type == #halt ifTrue:[
   249                         detect:[:ign | ign isForBreakpointWithParameter:parameterOrNil]
   279             oldEntry := IgnoredHalts
   250                         ifNone:nil.
   280                             detect:[:ign | ign isForMethod:methodOrNil line:lineNrOfHaltOrNil]
       
   281                             ifNone:nil.
       
   282         ] ifFalse:[
       
   283             oldEntry := IgnoredHalts
       
   284                             detect:[:ign | ign isForBreakpointWithParameter:parameterOrNil]
       
   285                             ifNone:nil.
       
   286         ].
   251         oldEntry notNil ifTrue:[
   287         oldEntry notNil ifTrue:[
   252             IgnoredHalts remove:oldEntry ifAbsent:[].
   288             IgnoredHalts remove:oldEntry ifAbsent:[].
   253         ]
   289         ]
   254     ].
   290     ].
   255 
   291 
   256     (countOrNil notNil or:[dTOrNil notNil or:[untilShiftKey == true]]) ifTrue:[
   292     (countOrNil notNil 
       
   293       or:[dTOrNil notNil 
       
   294       or:[untilShiftKey == true
       
   295       or:[receiverClassOrNil notNil
       
   296       or:[processOrNil notNil]]]]
       
   297     ) ifTrue:[
   257         IgnoredHalts isNil ifTrue:[
   298         IgnoredHalts isNil ifTrue:[
   258             IgnoredHalts := OrderedCollection new.
   299             IgnoredHalts := OrderedCollection new.
   259         ].
   300         ].
   260         ign := IgnoredHalt new breakpointWithParameter:parameterOrNil.
   301         type == #halt ifTrue:[
       
   302             ign := IgnoredHalt new method:methodOrNil lineNumber:lineNrOfHaltOrNil.
       
   303         ] ifFalse:[
       
   304             ign := IgnoredHalt new breakpointWithParameter:parameterOrNil.
       
   305         ].
   261 
   306 
   262         (countOrNil notNil and:[countOrNil > 0]) ifTrue:[
   307         (countOrNil notNil and:[countOrNil > 0]) ifTrue:[
   263             ign ignoreCount:countOrNil.
   308             ign ignoreCount:countOrNil.
   264         ].
   309         ].
   265         (dTOrNil notNil) ifTrue:[
   310         (dTOrNil notNil) ifTrue:[
   266             ign ignoreEndTime:(Timestamp now + dTOrNil).
   311             ign ignoreEndTime:(Timestamp now + dTOrNil).
   267         ].
   312         ].
   268         untilShiftKey == true ifTrue:[
   313         untilShiftKey == true ifTrue:[
   269             ign ignoreUntilShiftKeyPressed:true.
   314             ign ignoreUntilShiftKeyPressed:true.
   270         ].
   315         ].
       
   316         receiverClassOrNil notNil ifTrue:[
       
   317             ign ignoreForReceiverClass:receiverClassOrNil.
       
   318         ].
       
   319         processOrNil notNil ifTrue:[
       
   320             ign ignoreForProcess:processOrNil.
       
   321         ].
   271         IgnoredHalts add:ign.
   322         IgnoredHalts add:ign.
   272     ].
   323     ].
   273     Smalltalk changed:#ignoredHalts.
   324     Smalltalk changed:#ignoredHalts.
   274 
   325 
   275     "Created: / 06-03-2012 / 12:37:58 / cg"
   326     "Created: / 06-03-2012 / 12:37:58 / cg"
   276 !
   327 !
   277 
   328 
   278 ignoreHaltIn:haltingMethod at:lineNrOfHalt forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
   329 isBreakpointToBeIgnoredForParameter:parameter context:aContext modifyEntryCount:modifyCount
   279     "remember to ignore a halt in some method for some number of invocations
       
   280      or until some time has elapsed.
       
   281      With nil count and time arguments, such an ignored halt is reactivated"
       
   282 
       
   283     |oldEntry ign|
       
   284 
       
   285     IgnoredHalts notNil ifTrue:[
       
   286         self removeInactiveIgnores.
       
   287         oldEntry := IgnoredHalts
       
   288                         detect:[:ign | ign isForMethod:haltingMethod line:lineNrOfHalt]
       
   289                         ifNone:nil.
       
   290         oldEntry notNil ifTrue:[
       
   291             IgnoredHalts remove:oldEntry ifAbsent:[].
       
   292         ]
       
   293     ].
       
   294 
       
   295     (countOrNil notNil or:[dTOrNil notNil or:[untilShiftKey == true]]) ifTrue:[
       
   296         IgnoredHalts isNil ifTrue:[
       
   297             IgnoredHalts := OrderedCollection new.
       
   298         ].
       
   299         ign := IgnoredHalt new method:haltingMethod lineNumber:lineNrOfHalt.
       
   300 
       
   301         (countOrNil notNil and:[countOrNil > 0]) ifTrue:[
       
   302             ign ignoreCount:countOrNil.
       
   303         ].
       
   304         (dTOrNil notNil) ifTrue:[
       
   305             ign ignoreEndTime:(Timestamp now + dTOrNil).
       
   306         ].
       
   307         untilShiftKey == true ifTrue:[
       
   308             ign ignoreUntilShiftKeyPressed:true.
       
   309         ].
       
   310         IgnoredHalts add:ign.
       
   311     ].
       
   312     Smalltalk changed:#ignoredHalts.
       
   313 
       
   314     "Created: / 27-01-2012 / 11:33:38 / cg"
       
   315 !
       
   316 
       
   317 isBreakpointToBeIgnoredForParameter:parameter modifyEntryCount:modifyCount
       
   318     "/ should a breakpoint be ignored ?
   330     "/ should a breakpoint be ignored ?
   319 
   331 
   320     IgnoredHalts isNil ifTrue:[^ false].
   332     IgnoredHalts isNil ifTrue:[^ false].
   321 
   333 
   322     "/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString.
   334     "/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString.
   341     ^ false.
   353     ^ false.
   342 
   354 
   343     "Created: / 06-03-2012 / 12:50:30 / cg"
   355     "Created: / 06-03-2012 / 12:50:30 / cg"
   344 !
   356 !
   345 
   357 
   346 isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod modifyEntryCount:modifyCount
   358 isHaltToBeIgnoredIn:haltingMethod atLineNr:lineNrInHaltingMethod context:aContext modifyEntryCount:modifyCount
   347     "should a halt be ignored ?"
   359     "should a halt be ignored ?"
   348 
   360 
   349     IgnoredHalts isNil ifTrue:[^ false].
   361     IgnoredHalts isNil ifTrue:[^ false].
   350 
   362 
   351     "/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString.
   363     "/ Transcript showCR:'halt/break in ',haltingMethod printString,' at ',lineNrInHaltingMethod printString.
   352     IgnoredHalts do:[:ign |
   364     IgnoredHalts do:[:ign |
   353         (ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod) ifTrue:[
   365         (ign isHaltIgnoredInMethod:haltingMethod line:lineNrInHaltingMethod context:aContext) ifTrue:[
   354             Transcript show:'Debugger [info]: halt/break ignored in ', haltingMethod whoString.
   366             Transcript show:'Debugger [info]: halt/break ignored in ', haltingMethod whoString.
   355             Transcript show:' ('; show:ign; showCR:')'.
   367             Transcript show:' ('; show:ign; showCR:')'.
   356 
   368 
   357             modifyCount ifTrue:[ ign decrementIgnoreCount ].
   369             modifyCount ifTrue:[ ign decrementIgnoreCount ].
   358             ign isHaltIgnored ifFalse:[
   370             ign isHaltIgnored ifFalse:[
   701                 )
   713                 )
   702                (MenuItem
   714                (MenuItem
   703                   enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
   715                   enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
   704                   label: 'For the Next N Times...'
   716                   label: 'For the Next N Times...'
   705                   itemValue: openIgnoreHaltNTimesDialog
   717                   itemValue: openIgnoreHaltNTimesDialog
       
   718                 )
       
   719                (MenuItem
       
   720                   enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
       
   721                   label: 'For this Receiver Class'
       
   722                   itemValue: ignoreHaltForThisReceiverClass
       
   723                 )
       
   724                (MenuItem
       
   725                   enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
       
   726                   label: 'In Current Process'
       
   727                   itemValue: ignoreHaltForCurrentProcess
   706                 )
   728                 )
   707                (MenuItem
   729                (MenuItem
   708                   enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
   730                   enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
   709                   label: 'Until Shift-Key is Pressed'
   731                   label: 'Until Shift-Key is Pressed'
   710                   itemValue: ignoreHaltUntilShiftKeyIsPressed
   732                   itemValue: ignoreHaltUntilShiftKeyIsPressed
  5284 doNotIgnoreBreakpoints
  5306 doNotIgnoreBreakpoints
  5285     self allowBreakPointsInDebugger:true
  5307     self allowBreakPointsInDebugger:true
  5286 !
  5308 !
  5287 
  5309 
  5288 ignoreAllHaltsForever
  5310 ignoreAllHaltsForever
  5289     self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:true.
  5311     self 
       
  5312         addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false 
       
  5313         orThisReceiverClass:false orCurrentProcess:false 
       
  5314         forAll:true.
  5290 
  5315 
  5291     "Created: / 08-05-2011 / 10:19:56 / cg"
  5316     "Created: / 08-05-2011 / 10:19:56 / cg"
  5292 !
  5317 !
  5293 
  5318 
  5294 ignoreAllHaltsUntilShiftKeyIsPressed
  5319 ignoreAllHaltsUntilShiftKeyIsPressed
  5295     self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:true.
  5320     self 
       
  5321         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
       
  5322         orThisReceiverClass:false orCurrentProcess:false 
       
  5323         forAll:true.
  5296 
  5324 
  5297     "Created: / 27-01-2012 / 11:32:14 / cg"
  5325     "Created: / 27-01-2012 / 11:32:14 / cg"
  5298 !
  5326 !
  5299 
  5327 
  5300 ignoreBreakpointsWithThisParameterForever
  5328 ignoreBreakpointsWithThisParameterForever
  5303 
  5331 
  5304     "Created: / 06-03-2012 / 12:35:48 / cg"
  5332     "Created: / 06-03-2012 / 12:35:48 / cg"
  5305 !
  5333 !
  5306 
  5334 
  5307 ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed
  5335 ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed
  5308     self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:false.
  5336     self 
       
  5337         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
       
  5338         orThisReceiverClass:false orCurrentProcess:false 
       
  5339         forAll:false.
  5309 
  5340 
  5310     "Created: / 06-03-2012 / 12:35:22 / cg"
  5341     "Created: / 06-03-2012 / 12:35:22 / cg"
  5311 !
  5342 !
  5312 
  5343 
       
  5344 ignoreHaltForCurrentProcess
       
  5345     self 
       
  5346         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
       
  5347         orThisReceiverClass:false orCurrentProcess:true 
       
  5348         forAll:true.
       
  5349 
       
  5350     "Created: / 27-01-2012 / 11:32:14 / cg"
       
  5351 !
       
  5352 
       
  5353 ignoreHaltForThisReceiverClass
       
  5354     self 
       
  5355         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
       
  5356         orThisReceiverClass:true orCurrentProcess:false 
       
  5357         forAll:true.
       
  5358 
       
  5359     "Created: / 27-01-2012 / 11:32:14 / cg"
       
  5360 !
       
  5361 
  5313 ignoreHaltForever
  5362 ignoreHaltForever
  5314     self addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false forAll:false.
  5363     self 
       
  5364         addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false 
       
  5365         orThisReceiverClass:false orCurrentProcess:false 
       
  5366         forAll:false.
  5315 
  5367 
  5316     "Modified: / 27-01-2012 / 11:31:37 / cg"
  5368     "Modified: / 27-01-2012 / 11:31:37 / cg"
  5317 !
  5369 !
  5318 
  5370 
  5319 ignoreHaltUntilShiftKeyIsPressed
  5371 ignoreHaltUntilShiftKeyIsPressed
  5320     self addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true forAll:false.
  5372     self 
       
  5373         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
       
  5374         orThisReceiverClass:false orCurrentProcess:false 
       
  5375         forAll:false.
  5321 
  5376 
  5322     "Created: / 27-01-2012 / 11:36:54 / cg"
  5377     "Created: / 27-01-2012 / 11:36:54 / cg"
  5323 !
  5378 !
  5324 
  5379 
  5325 openBreakPointBrowser
  5380 openBreakPointBrowser
  5338         answer isEmptyOrNil ifTrue:[^ self].
  5393         answer isEmptyOrNil ifTrue:[^ self].
  5339 
  5394 
  5340         dT := TimeDuration readFrom:answer onError:[ nil ].
  5395         dT := TimeDuration readFrom:answer onError:[ nil ].
  5341         dT notNil ifTrue:[
  5396         dT notNil ifTrue:[
  5342             LastIgnoreHaltDuration := dT.
  5397             LastIgnoreHaltDuration := dT.
  5343             self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:true.
  5398             self 
       
  5399                 addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false 
       
  5400                 orThisReceiverClass:false orCurrentProcess:false 
       
  5401                 forAll:true.
  5344             ^ self.
  5402             ^ self.
  5345         ].
  5403         ].
  5346     ] loop
  5404     ] loop
  5347 
  5405 
  5348     "Created: / 08-05-2011 / 10:19:20 / cg"
  5406     "Created: / 08-05-2011 / 10:19:20 / cg"
  5360         answer isEmptyOrNil ifTrue:[^ self].
  5418         answer isEmptyOrNil ifTrue:[^ self].
  5361 
  5419 
  5362         n := Integer readFrom:answer onError:nil.
  5420         n := Integer readFrom:answer onError:nil.
  5363         n notNil ifTrue:[
  5421         n notNil ifTrue:[
  5364             LastIgnoreHaltNTimes := n.
  5422             LastIgnoreHaltNTimes := n.
  5365             self addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false forAll:false.
  5423             self 
       
  5424                 addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false 
       
  5425                 orThisReceiverClass:false orCurrentProcess:false 
       
  5426                 forAll:false.
  5366             ^ self.
  5427             ^ self.
  5367         ].
  5428         ].
  5368     ] loop.
  5429     ] loop.
  5369 
  5430 
  5370     "Modified: / 27-01-2012 / 11:31:44 / cg"
  5431     "Modified: / 27-01-2012 / 11:31:44 / cg"
  5383         answer isEmptyOrNil ifTrue:[^ self].
  5444         answer isEmptyOrNil ifTrue:[^ self].
  5384 
  5445 
  5385         dT := TimeDuration readFrom:answer onError:[ nil ].
  5446         dT := TimeDuration readFrom:answer onError:[ nil ].
  5386         dT notNil ifTrue:[
  5447         dT notNil ifTrue:[
  5387             LastIgnoreHaltDuration := dT.
  5448             LastIgnoreHaltDuration := dT.
  5388             self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:false.
  5449             self 
       
  5450                 addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false 
       
  5451                 orThisReceiverClass:false orCurrentProcess:false 
       
  5452                 forAll:false.
  5389             ^ self.
  5453             ^ self.
  5390         ].
  5454         ].
  5391     ] loop
  5455     ] loop
  5392 
  5456 
  5393     "Created: / 06-03-2012 / 12:03:36 / cg"
  5457     "Created: / 06-03-2012 / 12:03:36 / cg"
  5403         answer isEmptyOrNil ifTrue:[^ self].
  5467         answer isEmptyOrNil ifTrue:[^ self].
  5404 
  5468 
  5405         n := Integer readFrom:answer onError:nil.
  5469         n := Integer readFrom:answer onError:nil.
  5406         n notNil ifTrue:[
  5470         n notNil ifTrue:[
  5407             LastIgnoreHaltNTimes := n.
  5471             LastIgnoreHaltNTimes := n.
  5408             self addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false forAll:false.
  5472             self 
       
  5473                 addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false 
       
  5474                 orThisReceiverClass:false orCurrentProcess:false 
       
  5475                 forAll:false.
  5409             ^ self.
  5476             ^ self.
  5410         ].
  5477         ].
  5411     ] loop.
  5478     ] loop.
  5412 
  5479 
  5413     "Modified: / 27-01-2012 / 11:31:44 / cg"
  5480     "Modified: / 27-01-2012 / 11:31:44 / cg"
  5423         answer isEmptyOrNil ifTrue:[^ self].
  5490         answer isEmptyOrNil ifTrue:[^ self].
  5424 
  5491 
  5425         dT := TimeDuration readFrom:answer onError:[ nil ].
  5492         dT := TimeDuration readFrom:answer onError:[ nil ].
  5426         dT notNil ifTrue:[
  5493         dT notNil ifTrue:[
  5427             LastIgnoreHaltDuration := dT.
  5494             LastIgnoreHaltDuration := dT.
  5428             self addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false forAll:false.
  5495             self 
       
  5496                 addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false 
       
  5497                 orThisReceiverClass:false orCurrentProcess:false 
       
  5498                 forAll:false.
  5429             ^ self.
  5499             ^ self.
  5430         ].
  5500         ].
  5431     ] loop
  5501     ] loop
  5432 
  5502 
  5433     "Modified: / 27-01-2012 / 11:31:47 / cg"
  5503     "Modified: / 27-01-2012 / 11:31:47 / cg"
  6057     setOfHiddenCallingSelectors := aCollectionOfSymbols
  6127     setOfHiddenCallingSelectors := aCollectionOfSymbols
  6058 ! !
  6128 ! !
  6059 
  6129 
  6060 !DebugView methodsFor:'private-breakpoints'!
  6130 !DebugView methodsFor:'private-breakpoints'!
  6061 
  6131 
  6062 addIgnoredHaltForCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey forAll:aBoolean
  6132 addIgnoredHaltForCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey 
  6063     |haltingContext haltingMethod lineNrOfHalt|
  6133                                   orThisReceiverClass:forThisReceiverClass orCurrentProcess:forCurrentProcess 
       
  6134                                   forAll:aBoolean
       
  6135     |haltingContext haltingMethod lineNrOfHalt receiverClassOrNil processOrNil|
  6064 
  6136 
  6065     aBoolean ifTrue:[
  6137     aBoolean ifTrue:[
  6066         haltingMethod := #all
  6138         haltingMethod := #all
  6067     ] ifFalse:[
  6139     ] ifFalse:[
  6068         haltingContext := self findHaltingContext.
  6140         haltingContext := self findHaltingContext.
  6075         lineNrOfHalt := haltingContext lineNumber.
  6147         lineNrOfHalt := haltingContext lineNumber.
  6076         (lineNrOfHalt isNil or:[lineNrOfHalt <= 0]) ifTrue:[ 
  6148         (lineNrOfHalt isNil or:[lineNrOfHalt <= 0]) ifTrue:[ 
  6077             Transcript showCR:'no halt lineNr found'. 
  6149             Transcript showCR:'no halt lineNr found'. 
  6078             ^ self 
  6150             ^ self 
  6079         ].
  6151         ].
       
  6152         forThisReceiverClass ifTrue:[
       
  6153             receiverClassOrNil := haltingContext receiver class
       
  6154         ].
       
  6155         forCurrentProcess ifTrue:[
       
  6156             processOrNil := Processor activeProcess
       
  6157         ].
  6080     ].
  6158     ].
  6081 
  6159 
  6082     self class
  6160     self class
  6083         ignoreHaltIn:haltingMethod at:lineNrOfHalt
  6161         ignoreHaltIn:haltingMethod at:lineNrOfHalt
  6084         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
  6162         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
       
  6163         orReceiverClass:receiverClassOrNil orProcess:processOrNil
  6085 
  6164 
  6086     "Created: / 27-01-2012 / 11:31:12 / cg"
  6165     "Created: / 27-01-2012 / 11:31:12 / cg"
  6087 !
  6166 !
  6088 
  6167 
  6089 canAddBreakpoint
  6168 canAddBreakpoint
  6315             c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil.
  6394             c := thisContext findNextContextWithSelector:#breakPoint: or:#breakPoint:info: or:nil.
  6316             c isNil ifTrue:[
  6395             c isNil ifTrue:[
  6317                ^ false
  6396                ^ false
  6318             ].
  6397             ].
  6319             breakpointParameter := c argAt:1.
  6398             breakpointParameter := c argAt:1.
  6320             (self class isBreakpointToBeIgnoredForParameter:breakpointParameter modifyEntryCount:true) ifTrue:[
  6399             (self class 
       
  6400                     isBreakpointToBeIgnoredForParameter:breakpointParameter
       
  6401                     context:(c sender)
       
  6402                     modifyEntryCount:true
       
  6403             ) ifTrue:[
  6321                 ^ true.
  6404                 ^ true.
  6322             ].
  6405             ].
  6323         ].
  6406         ].
  6324     ].
  6407     ].
  6325 
  6408 
  6338     ].
  6421     ].
  6339 
  6422 
  6340     ^ self class
  6423     ^ self class
  6341         isHaltToBeIgnoredIn:haltingMethod
  6424         isHaltToBeIgnoredIn:haltingMethod
  6342         atLineNr:lineNrInHaltingMethod
  6425         atLineNr:lineNrInHaltingMethod
       
  6426         context:c
  6343         modifyEntryCount:true.
  6427         modifyEntryCount:true.
  6344 
  6428 
  6345     "Created: / 22-10-2010 / 12:09:53 / cg"
  6429     "Created: / 22-10-2010 / 12:09:53 / cg"
  6346     "Modified: / 06-03-2012 / 12:54:09 / cg"
  6430     "Modified: / 06-03-2012 / 12:54:09 / cg"
  6347 !
  6431 !
  8095 
  8179 
  8096 ignoreEndTime:something
  8180 ignoreEndTime:something
  8097     ignoreEndTime := something.
  8181     ignoreEndTime := something.
  8098 !
  8182 !
  8099 
  8183 
       
  8184 ignoreForProcess:aProcess
       
  8185     ignoredProcesses isNil ifTrue:[
       
  8186         ignoredProcesses := WeakIdentitySet new.
       
  8187     ].
       
  8188     ignoredProcesses add:aProcess
       
  8189 !
       
  8190 
       
  8191 ignoreForReceiverClass:aClass
       
  8192     ignoredReceiverClasses isNil ifTrue:[
       
  8193         ignoredReceiverClasses := WeakIdentitySet new.
       
  8194     ].
       
  8195     ignoredReceiverClasses add:aClass
       
  8196 !
       
  8197 
  8100 ignoreUntilShiftKeyPressed:aBoolean
  8198 ignoreUntilShiftKeyPressed:aBoolean
  8101     ignoreUntilShiftKeyPressed := aBoolean.
  8199     ignoreUntilShiftKeyPressed := aBoolean.
  8102 
  8200 
  8103     "Created: / 27-01-2012 / 11:35:23 / cg"
  8201     "Created: / 27-01-2012 / 11:35:23 / cg"
  8104 ! !
  8202 ! !
  8114 ! !
  8212 ! !
  8115 
  8213 
  8116 !DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'!
  8214 !DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'!
  8117 
  8215 
  8118 printConditionOn:aStream
  8216 printConditionOn:aStream
  8119     ignoreUntilShiftKeyPressed == true ifTrue:[
  8217     ignoredProcesses notEmptyOrNil ifTrue:[
  8120         aStream nextPutAll:' until shiftKey pressed'.
  8218         aStream nextPutAll:' in processes ',(ignoredProcesses collect:[:each | each name]).
  8121     ] ifFalse:[
  8219     ] ifFalse:[
  8122         ignoreEndTime notNil ifTrue:[
  8220         ignoredReceiverClasses notNil ifTrue:[
  8123             aStream nextPutAll:' until '.
  8221             aStream nextPutAll:' for classes ',(ignoredReceiverClasses collect:[:each | each name]).
  8124             ignoreEndTime printOn:aStream.
       
  8125         ] ifFalse:[
  8222         ] ifFalse:[
  8126             (ignoreCount notNil) ifTrue:[
  8223             ignoreUntilShiftKeyPressed == true ifTrue:[
  8127                 (ignoreCount > 0) ifTrue:[
  8224                 aStream nextPutAll:' until shiftKey pressed'.
  8128                     aStream nextPutAll:' for '.
  8225             ] ifFalse:[
  8129                     ignoreCount printOn:aStream.
  8226                 ignoreEndTime notNil ifTrue:[
       
  8227                     aStream nextPutAll:' until '.
       
  8228                     ignoreEndTime printOn:aStream.
  8130                 ] ifFalse:[
  8229                 ] ifFalse:[
  8131                     (ignoreCount < 0) ifTrue:[
  8230                     (ignoreCount notNil) ifTrue:[
  8132                         aStream nextPutAll:' forEver'.
  8231                         (ignoreCount > 0) ifTrue:[
  8133                     ] ifFalse:[
  8232                             aStream nextPutAll:' for '.
  8134                         aStream nextPutAll:' no longer'.
  8233                             ignoreCount printOn:aStream.
  8135                     ].
  8234                         ] ifFalse:[
       
  8235                             (ignoreCount < 0) ifTrue:[
       
  8236                                 aStream nextPutAll:' forEver'.
       
  8237                             ] ifFalse:[
       
  8238                                 aStream nextPutAll:' no longer'.
       
  8239                             ].
       
  8240                         ].
       
  8241                     ]
  8136                 ].
  8242                 ].
  8137             ]
  8243             ].
  8138         ].
  8244         ].
  8139     ].
  8245     ].
  8140 
  8246 
  8141     "Modified: / 27-01-2012 / 11:43:10 / cg"
  8247     "Modified: / 27-01-2012 / 11:43:10 / cg"
  8142     "Created: / 06-03-2012 / 12:41:10 / cg"
  8248     "Created: / 06-03-2012 / 12:41:10 / cg"
  8293 
  8399 
  8294     "Modified: / 08-05-2011 / 10:27:31 / cg"
  8400     "Modified: / 08-05-2011 / 10:27:31 / cg"
  8295 !
  8401 !
  8296 
  8402 
  8297 isHaltIgnoredInMethod:aMethod line:line
  8403 isHaltIgnoredInMethod:aMethod line:line
       
  8404     ^ self isHaltIgnoredInMethod:aMethod line:line context:nil
       
  8405 !
       
  8406 
       
  8407 isHaltIgnoredInMethod:aMethod line:line context:context
  8298     "/ Transcript show:'?same as ign '; show:(weakMethodHolder at:1); show:' at '; showCR:lineNumber.
  8408     "/ Transcript show:'?same as ign '; show:(weakMethodHolder at:1); show:' at '; showCR:lineNumber.
  8299 
  8409 
  8300     (self isForMethod:aMethod line:line) ifFalse:[^ false].
  8410     (self isForMethod:aMethod line:line) ifFalse:[^ false].
  8301     "/ Transcript show:'is same; ignored: '; showCR:self isHaltIgnored.
  8411     "/ Transcript show:'is same; ignored: '; showCR:self isHaltIgnored.
       
  8412 
       
  8413     context notNil ifTrue:[
       
  8414         ignoredReceiverClasses notNil ifTrue:[
       
  8415             ^ ignoredReceiverClasses includes:(context receiver class)
       
  8416         ].
       
  8417         ignoredProcesses notNil ifTrue:[
       
  8418             ^ ignoredProcesses includes:(Processor activeProcess)
       
  8419         ].
       
  8420     ].
  8302 
  8421 
  8303     ^ self isHaltIgnored
  8422     ^ self isHaltIgnored
  8304 ! !
  8423 ! !
  8305 
  8424 
  8306 !DebugView::IgnoredBreakpoint methodsFor:'accessing'!
  8425 !DebugView::IgnoredBreakpoint methodsFor:'accessing'!
  8337 ! !
  8456 ! !
  8338 
  8457 
  8339 !DebugView class methodsFor:'documentation'!
  8458 !DebugView class methodsFor:'documentation'!
  8340 
  8459 
  8341 version
  8460 version
  8342     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.593 2013-06-19 06:31:23 stefan Exp $'
  8461     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.594 2013-06-20 15:56:42 cg Exp $'
  8343 !
  8462 !
  8344 
  8463 
  8345 version_CVS
  8464 version_CVS
  8346     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.593 2013-06-19 06:31:23 stefan Exp $'
  8465     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.594 2013-06-20 15:56:42 cg Exp $'
  8347 !
  8466 !
  8348 
  8467 
  8349 version_SVN
  8468 version_SVN
  8350     ^ '$Id: DebugView.st,v 1.593 2013-06-19 06:31:23 stefan Exp $'
  8469     ^ '$Id: DebugView.st,v 1.594 2013-06-20 15:56:42 cg Exp $'
  8351 ! !
  8470 ! !
  8352 
  8471 
  8353 
  8472 
  8354 DebugView initialize!
  8473 DebugView initialize!