DebugView.st
changeset 14608 948821582e7f
parent 14559 1de1084ebbd9
child 14640 692dba3782da
equal deleted inserted replaced
14607:b4a144ee8154 14608:948821582e7f
    43 	category:'Interface-Debugger'
    43 	category:'Interface-Debugger'
    44 !
    44 !
    45 
    45 
    46 Object subclass:#IgnoredHaltOrBreakpoint
    46 Object subclass:#IgnoredHaltOrBreakpoint
    47 	instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed
    47 	instanceVariableNames:'ignoreEndTime ignoreCount ignoreUntilShiftKeyPressed
    48 		ignoredReceiverClasses ignoredProcesses'
    48 		ignoredReceiverClasses ignoredProcesses
       
    49 		ignoredSendingClassAndSelectors'
    49 	classVariableNames:''
    50 	classVariableNames:''
    50 	poolDictionaries:''
    51 	poolDictionaries:''
    51 	privateIn:DebugView
    52 	privateIn:DebugView
    52 !
    53 !
    53 
    54 
   253 hasIgnoredHalts
   254 hasIgnoredHalts
   254     self removeInactiveIgnores.
   255     self removeInactiveIgnores.
   255     ^ IgnoredHalts notEmptyOrNil
   256     ^ IgnoredHalts notEmptyOrNil
   256 !
   257 !
   257 
   258 
   258 ignoreBreakpointWithParameter:parameterOrNil forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey orReceiverClass:receiverClassOrNil orProcess:processOrNil
   259 ignoreBreakpointWithParameter:parameterOrNil 
       
   260         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey 
       
   261         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   262 
   259     "remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations
   263     "remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations
   260      or until some time has elapsed.
   264      or until some time has elapsed.
   261      With nil count and time arguments, such an ignored breakpoint is reactivated"
   265      With nil count and time arguments, such an ignored breakpoint is reactivated"
   262 
   266 
   263     self 
   267     self 
   264         ignoreHaltOrBreakpoint:#halt 
   268         ignoreHaltOrBreakpoint:#halt 
   265         method:nil line:nil  
   269         method:nil line:nil  
   266         parameter:parameterOrNil 
   270         parameter:parameterOrNil 
   267         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
   271         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
   268         orReceiverClass:receiverClassOrNil orProcess:processOrNil
   272         orReceiverClass:receiverClassOrNil orProcess:processOrNil
   269 !
   273         orIfCalledFromMethod:nil
   270 
   274 !
   271 ignoreHaltIn:haltingMethod at:lineNrOfHalt forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey orReceiverClass:receiverClassOrNil orProcess:processOrNil
   275 
       
   276 ignoreHaltIn:haltingMethod at:lineNrOfHalt 
       
   277         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey 
       
   278         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   279 
   272     "remember to ignore a halt in some method for some number of invocations
   280     "remember to ignore a halt in some method for some number of invocations
   273      or until some time has elapsed.
   281      or until some time has elapsed.
   274      With nil count and time arguments, such an ignored halt is reactivated"
   282      With nil count and time arguments, such an ignored halt is reactivated"
   275 
   283 
   276     self 
   284     self 
   277         ignoreHaltOrBreakpoint:#halt 
   285         ignoreHaltOrBreakpoint:#halt 
   278         method:haltingMethod line:lineNrOfHalt  
   286         method:haltingMethod line:lineNrOfHalt  
   279         parameter:nil 
   287         parameter:nil 
   280         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
   288         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
   281         orReceiverClass:receiverClassOrNil orProcess:processOrNil
   289         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   290         orIfCalledFromMethod:nil
       
   291 !
       
   292 
       
   293 ignoreHaltIn:haltingMethod at:lineNrOfHalt 
       
   294         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey 
       
   295         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   296         orIfCalledFromMethod:ifCalledForMethodOrNil
       
   297 
       
   298     "remember to ignore a halt in some method for some number of invocations
       
   299      or until some time has elapsed.
       
   300      With nil count and time arguments, such an ignored halt is reactivated"
       
   301 
       
   302     self 
       
   303         ignoreHaltOrBreakpoint:#halt 
       
   304         method:haltingMethod line:lineNrOfHalt  
       
   305         parameter:nil 
       
   306         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
       
   307         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   308         orIfCalledFromMethod:ifCalledForMethodOrNil
   282 !
   309 !
   283 
   310 
   284 ignoreHaltOrBreakpoint:type method:methodOrNil line:lineNrOfHaltOrNil parameter:parameterOrNil 
   311 ignoreHaltOrBreakpoint:type method:methodOrNil line:lineNrOfHaltOrNil parameter:parameterOrNil 
   285         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
   312         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
   286         orReceiverClass:receiverClassOrNil orProcess:processOrNil
   313         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   314 
       
   315     "remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations
       
   316      or until some time has elapsed.
       
   317      With nil count and time arguments, such an ignored breakpoint is reactivated"
       
   318 
       
   319     ^ self
       
   320         ignoreHaltOrBreakpoint:type method:methodOrNil line:lineNrOfHaltOrNil parameter:parameterOrNil 
       
   321         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
       
   322         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   323         orIfCalledFromMethod:nil
       
   324 !
       
   325 
       
   326 ignoreHaltOrBreakpoint:type method:methodOrNil line:lineNrOfHaltOrNil parameter:parameterOrNil 
       
   327         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
       
   328         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
   329         orIfCalledFromMethod:ifCalledFromMethodOrNil
   287 
   330 
   288     "remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations
   331     "remember to ignore a breakpoint with a parameter (i.e. breakpoint:#cg) for some number of invocations
   289      or until some time has elapsed.
   332      or until some time has elapsed.
   290      With nil count and time arguments, such an ignored breakpoint is reactivated"
   333      With nil count and time arguments, such an ignored breakpoint is reactivated"
   291 
   334 
   318 
   361 
   319     (countOrNil notNil 
   362     (countOrNil notNil 
   320       or:[dTOrNil notNil 
   363       or:[dTOrNil notNil 
   321       or:[untilShiftKey == true
   364       or:[untilShiftKey == true
   322       or:[receiverClassOrNil notNil
   365       or:[receiverClassOrNil notNil
   323       or:[processOrNil notNil]]]]
   366       or:[processOrNil notNil
       
   367       or:[ifCalledFromMethodOrNil notNil]]]]]
   324     ) ifTrue:[
   368     ) ifTrue:[
   325         IgnoredHalts isNil ifTrue:[
   369         IgnoredHalts isNil ifTrue:[
   326             IgnoredHalts := OrderedCollection new.
   370             IgnoredHalts := OrderedCollection new.
   327         ].
   371         ].
   328         type == #halt ifTrue:[
   372         type == #halt ifTrue:[
   343         receiverClassOrNil notNil ifTrue:[
   387         receiverClassOrNil notNil ifTrue:[
   344             ign ignoreForReceiverClass:receiverClassOrNil.
   388             ign ignoreForReceiverClass:receiverClassOrNil.
   345         ].
   389         ].
   346         processOrNil notNil ifTrue:[
   390         processOrNil notNil ifTrue:[
   347             ign ignoreForProcess:processOrNil.
   391             ign ignoreForProcess:processOrNil.
       
   392         ].
       
   393         ifCalledFromMethodOrNil notNil ifTrue:[ 
       
   394             ign ignoreIfCalledFromMethod:ifCalledFromMethodOrNil.
   348         ].
   395         ].
   349         IgnoredHalts add:ign.
   396         IgnoredHalts add:ign.
   350     ].
   397     ].
   351     Smalltalk changed:#ignoredHalts.
   398     Smalltalk changed:#ignoredHalts.
   352 
   399 
   779                 )
   826                 )
   780                (MenuItem
   827                (MenuItem
   781                   enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
   828                   enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
   782                   label: 'For this Receiver Class'
   829                   label: 'For this Receiver Class'
   783                   itemValue: ignoreHaltForThisReceiverClass
   830                   itemValue: ignoreHaltForThisReceiverClass
       
   831                 )
       
   832                (MenuItem
       
   833                   enabled: isStoppedAtHaltOrBreakPointOrSelectedContextIsWrapped
       
   834                   label: 'If Called from Any Of'
       
   835                   submenuChannel: menuForIgnoreBreakpointIfCalledFromAnyOf
   784                 )
   836                 )
   785                )
   837                )
   786               nil
   838               nil
   787               nil
   839               nil
   788             )
   840             )
  5907 !
  5959 !
  5908 
  5960 
  5909 ignoreAllHaltsForever
  5961 ignoreAllHaltsForever
  5910     self 
  5962     self 
  5911         addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false 
  5963         addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false 
  5912         orThisReceiverClass:false orCurrentProcess:false 
  5964         orThisReceiverClass:false orCurrentProcess:false
       
  5965         orIfCalledFromMethod:nil
  5913         forAll:true.
  5966         forAll:true.
  5914 
  5967 
  5915     "Created: / 08-05-2011 / 10:19:56 / cg"
  5968     "Created: / 08-05-2011 / 10:19:56 / cg"
  5916 !
  5969 !
  5917 
  5970 
  5918 ignoreAllHaltsUntilShiftKeyIsPressed
  5971 ignoreAllHaltsUntilShiftKeyIsPressed
  5919     self 
  5972     self 
  5920         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
  5973         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
  5921         orThisReceiverClass:false orCurrentProcess:false 
  5974         orThisReceiverClass:false orCurrentProcess:false 
       
  5975         orIfCalledFromMethod:nil
  5922         forAll:true.
  5976         forAll:true.
  5923 
  5977 
  5924     "Created: / 27-01-2012 / 11:32:14 / cg"
  5978     "Created: / 27-01-2012 / 11:32:14 / cg"
  5925 !
  5979 !
  5926 
  5980 
  5933 
  5987 
  5934 ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed
  5988 ignoreBreakpointsWithThisParameterUntilShiftKeyIsPressed
  5935     self 
  5989     self 
  5936         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
  5990         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
  5937         orThisReceiverClass:false orCurrentProcess:false 
  5991         orThisReceiverClass:false orCurrentProcess:false 
       
  5992         orIfCalledFromMethod:nil
  5938         forAll:false.
  5993         forAll:false.
  5939 
  5994 
  5940     "Created: / 06-03-2012 / 12:35:22 / cg"
  5995     "Created: / 06-03-2012 / 12:35:22 / cg"
  5941 !
  5996 !
  5942 
  5997 
  5943 ignoreHaltForCurrentProcess
  5998 ignoreHaltForCurrentProcess
  5944     self 
  5999     self 
  5945         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
  6000         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
  5946         orThisReceiverClass:false orCurrentProcess:true 
  6001         orThisReceiverClass:false orCurrentProcess:true 
       
  6002         orIfCalledFromMethod:nil
  5947         forAll:false.
  6003         forAll:false.
  5948 
  6004 
  5949     "Created: / 27-01-2012 / 11:32:14 / cg"
  6005     "Created: / 27-01-2012 / 11:32:14 / cg"
  5950 !
  6006 !
  5951 
  6007 
  5952 ignoreHaltForThisReceiverClass
  6008 ignoreHaltForThisReceiverClass
  5953     self 
  6009     self 
  5954         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
  6010         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
  5955         orThisReceiverClass:true orCurrentProcess:false 
  6011         orThisReceiverClass:true orCurrentProcess:false 
       
  6012         orIfCalledFromMethod:nil
  5956         forAll:false.
  6013         forAll:false.
  5957 
  6014 
  5958     "Created: / 27-01-2012 / 11:32:14 / cg"
  6015     "Created: / 27-01-2012 / 11:32:14 / cg"
  5959 !
  6016 !
  5960 
  6017 
  5961 ignoreHaltForever
  6018 ignoreHaltForever
  5962     self 
  6019     self 
  5963         addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false 
  6020         addIgnoredHaltForCount:-1 orTimeDuration:nil orUntilShiftKey:false 
  5964         orThisReceiverClass:false orCurrentProcess:false 
  6021         orThisReceiverClass:false orCurrentProcess:false 
       
  6022         orIfCalledFromMethod:nil
  5965         forAll:false.
  6023         forAll:false.
  5966 
  6024 
  5967     "Modified: / 27-01-2012 / 11:31:37 / cg"
  6025     "Modified: / 27-01-2012 / 11:31:37 / cg"
       
  6026 !
       
  6027 
       
  6028 ignoreHaltIfCalledFromMethod:aMethod
       
  6029     self 
       
  6030         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:false 
       
  6031         orThisReceiverClass:false orCurrentProcess:false 
       
  6032         orIfCalledFromMethod:aMethod
       
  6033         forAll:false.
  5968 !
  6034 !
  5969 
  6035 
  5970 ignoreHaltUntilShiftKeyIsPressed
  6036 ignoreHaltUntilShiftKeyIsPressed
  5971     self 
  6037     self 
  5972         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
  6038         addIgnoredHaltForCount:nil orTimeDuration:nil orUntilShiftKey:true 
  5973         orThisReceiverClass:false orCurrentProcess:false 
  6039         orThisReceiverClass:false orCurrentProcess:false 
       
  6040         orIfCalledFromMethod:nil
  5974         forAll:false.
  6041         forAll:false.
  5975 
  6042 
  5976     "Created: / 27-01-2012 / 11:36:54 / cg"
  6043     "Created: / 27-01-2012 / 11:36:54 / cg"
       
  6044 !
       
  6045 
       
  6046 menuForIgnoreBreakpointIfCalledFromAnyOf
       
  6047     <resource: #programMenu >
       
  6048 
       
  6049     |m count already|
       
  6050 
       
  6051     m := Menu new.
       
  6052     count := 0.
       
  6053     already := IdentitySet new.
       
  6054 
       
  6055     contextArray do:[:con |
       
  6056         |mthd cls sel|
       
  6057 
       
  6058         mthd := con method.
       
  6059         mthd notNil ifTrue:[
       
  6060             mthd isWrapped ifFalse:[
       
  6061                 (already includes:already) ifFalse:[
       
  6062                     already add:mthd.
       
  6063                     m addItem:(MenuItem 
       
  6064                                 label: (mthd whoString)
       
  6065                                 itemValue: [ self ignoreHaltIfCalledFromMethod:mthd ]
       
  6066                                 translateLabel: false).
       
  6067                     count := count + 1.
       
  6068                     (count > 20) ifTrue:[
       
  6069                         ^ m
       
  6070                     ].
       
  6071                 ]
       
  6072             ]
       
  6073         ]
       
  6074     ].
       
  6075     ^ m
  5977 !
  6076 !
  5978 
  6077 
  5979 openBreakPointBrowser
  6078 openBreakPointBrowser
  5980     Tools::BreakpointBrowser open
  6079     Tools::BreakpointBrowser open
  5981 
  6080 
  5995         dT notNil ifTrue:[
  6094         dT notNil ifTrue:[
  5996             LastIgnoreHaltDuration := dT.
  6095             LastIgnoreHaltDuration := dT.
  5997             self 
  6096             self 
  5998                 addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false 
  6097                 addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false 
  5999                 orThisReceiverClass:false orCurrentProcess:false 
  6098                 orThisReceiverClass:false orCurrentProcess:false 
       
  6099                 orIfCalledFromMethod:nil
  6000                 forAll:true.
  6100                 forAll:true.
  6001             ^ self.
  6101             ^ self.
  6002         ].
  6102         ].
  6003     ] loop
  6103     ] loop
  6004 
  6104 
  6020         n notNil ifTrue:[
  6120         n notNil ifTrue:[
  6021             LastIgnoreHaltNTimes := n.
  6121             LastIgnoreHaltNTimes := n.
  6022             self 
  6122             self 
  6023                 addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false 
  6123                 addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false 
  6024                 orThisReceiverClass:false orCurrentProcess:false 
  6124                 orThisReceiverClass:false orCurrentProcess:false 
       
  6125                 orIfCalledFromMethod:nil
  6025                 forAll:false.
  6126                 forAll:false.
  6026             ^ self.
  6127             ^ self.
  6027         ].
  6128         ].
  6028     ] loop.
  6129     ] loop.
  6029 
  6130 
  6046         dT notNil ifTrue:[
  6147         dT notNil ifTrue:[
  6047             LastIgnoreHaltDuration := dT.
  6148             LastIgnoreHaltDuration := dT.
  6048             self 
  6149             self 
  6049                 addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false 
  6150                 addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false 
  6050                 orThisReceiverClass:false orCurrentProcess:false 
  6151                 orThisReceiverClass:false orCurrentProcess:false 
       
  6152                 orIfCalledFromMethod:nil
  6051                 forAll:false.
  6153                 forAll:false.
  6052             ^ self.
  6154             ^ self.
  6053         ].
  6155         ].
  6054     ] loop
  6156     ] loop
  6055 
  6157 
  6069         n notNil ifTrue:[
  6171         n notNil ifTrue:[
  6070             LastIgnoreHaltNTimes := n.
  6172             LastIgnoreHaltNTimes := n.
  6071             self 
  6173             self 
  6072                 addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false 
  6174                 addIgnoredHaltForCount:n orTimeDuration:nil orUntilShiftKey:false 
  6073                 orThisReceiverClass:false orCurrentProcess:false 
  6175                 orThisReceiverClass:false orCurrentProcess:false 
       
  6176                 orIfCalledFromMethod:nil
  6074                 forAll:false.
  6177                 forAll:false.
  6075             ^ self.
  6178             ^ self.
  6076         ].
  6179         ].
  6077     ] loop.
  6180     ] loop.
  6078 
  6181 
  6092         dT notNil ifTrue:[
  6195         dT notNil ifTrue:[
  6093             LastIgnoreHaltDuration := dT.
  6196             LastIgnoreHaltDuration := dT.
  6094             self 
  6197             self 
  6095                 addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false 
  6198                 addIgnoredHaltForCount:nil orTimeDuration:dT orUntilShiftKey:false 
  6096                 orThisReceiverClass:false orCurrentProcess:false 
  6199                 orThisReceiverClass:false orCurrentProcess:false 
       
  6200                 orIfCalledFromMethod:nil
  6097                 forAll:false.
  6201                 forAll:false.
  6098             ^ self.
  6202             ^ self.
  6099         ].
  6203         ].
  6100     ] loop
  6204     ] loop
  6101 
  6205 
  6749     setOfHiddenCallingSelectors := aCollectionOfSymbols
  6853     setOfHiddenCallingSelectors := aCollectionOfSymbols
  6750 ! !
  6854 ! !
  6751 
  6855 
  6752 !DebugView methodsFor:'private-breakpoints'!
  6856 !DebugView methodsFor:'private-breakpoints'!
  6753 
  6857 
  6754 addIgnoredHaltForCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey 
  6858 addIgnoredHaltForCount:countOrNil 
  6755                                   orThisReceiverClass:forThisReceiverClass orCurrentProcess:forCurrentProcess 
  6859         orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey 
  6756                                   forAll:aBoolean
  6860         orThisReceiverClass:forThisReceiverClass orCurrentProcess:forCurrentProcess
       
  6861         orIfCalledFromMethod:ifCalledForMethodOrNil
       
  6862         forAll:aBoolean
       
  6863 
  6757     |haltingContext haltingMethod lineNrOfHalt receiverClassOrNil processOrNil|
  6864     |haltingContext haltingMethod lineNrOfHalt receiverClassOrNil processOrNil|
  6758 
  6865 
  6759     aBoolean ifTrue:[
  6866     aBoolean ifTrue:[
  6760         haltingMethod := #all
  6867         haltingMethod := #all
  6761     ] ifFalse:[
  6868     ] ifFalse:[
  6781 
  6888 
  6782     self class
  6889     self class
  6783         ignoreHaltIn:haltingMethod at:lineNrOfHalt
  6890         ignoreHaltIn:haltingMethod at:lineNrOfHalt
  6784         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
  6891         forCount:countOrNil orTimeDuration:dTOrNil orUntilShiftKey:untilShiftKey
  6785         orReceiverClass:receiverClassOrNil orProcess:processOrNil
  6892         orReceiverClass:receiverClassOrNil orProcess:processOrNil
       
  6893         orIfCalledFromMethod:ifCalledForMethodOrNil
  6786 
  6894 
  6787     "Created: / 27-01-2012 / 11:31:12 / cg"
  6895     "Created: / 27-01-2012 / 11:31:12 / cg"
  6788 !
  6896 !
  6789 
  6897 
  6790 canAddBreakpoint
  6898 canAddBreakpoint
  8911         ignoredReceiverClasses := WeakIdentitySet new.
  9019         ignoredReceiverClasses := WeakIdentitySet new.
  8912     ].
  9020     ].
  8913     ignoredReceiverClasses add:aClass
  9021     ignoredReceiverClasses add:aClass
  8914 !
  9022 !
  8915 
  9023 
       
  9024 ignoreIfCalledFromMethod:aMethod
       
  9025     ignoredSendingClassAndSelectors isNil ifTrue:[
       
  9026          ignoredSendingClassAndSelectors := OrderedCollection new.
       
  9027     ].
       
  9028 
       
  9029     "/ remember the method's name, not the method.
       
  9030     "/ so it can be recompiled and we still detect ignores
       
  9031     ignoredSendingClassAndSelectors add:{aMethod mclass name . aMethod selector }
       
  9032 !
       
  9033 
  8916 ignoreUntilShiftKeyPressed:aBoolean
  9034 ignoreUntilShiftKeyPressed:aBoolean
  8917     ignoreUntilShiftKeyPressed := aBoolean.
  9035     ignoreUntilShiftKeyPressed := aBoolean.
  8918 
  9036 
  8919     "Created: / 27-01-2012 / 11:35:23 / cg"
  9037     "Created: / 27-01-2012 / 11:35:23 / cg"
  8920 ! !
  9038 ! !
  8930 ! !
  9048 ! !
  8931 
  9049 
  8932 !DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'!
  9050 !DebugView::IgnoredHaltOrBreakpoint methodsFor:'printing'!
  8933 
  9051 
  8934 printConditionOn:aStream
  9052 printConditionOn:aStream
       
  9053     ignoredSendingClassAndSelectors notEmptyOrNil ifTrue:[
       
  9054         aStream nextPutAll:(' if called from %1 >> %2'
       
  9055                                 bindWith:ignoredSendingClassAndSelectors first first
       
  9056                                 with:ignoredSendingClassAndSelectors first second).
       
  9057         ^ self.
       
  9058     ].
  8935     ignoredProcesses notEmptyOrNil ifTrue:[
  9059     ignoredProcesses notEmptyOrNil ifTrue:[
  8936         aStream nextPutAll:(' in %1 processes (%2)'
  9060         aStream nextPutAll:(' in %1 processes (%2)'
  8937                                 bindWith:ignoredProcesses size
  9061                                 bindWith:ignoredProcesses size
  8938                                 with:((ignoredProcesses collect:[:each | each name] as:OrderedCollection) asStringWith:', ')).
  9062                                 with:((ignoredProcesses collect:[:each | each name] as:OrderedCollection) asStringWith:', ')).
  8939     ] ifFalse:[
  9063         ^ self.
  8940         ignoredReceiverClasses notNil ifTrue:[
  9064     ].
  8941             aStream nextPutAll:(' for %1 classes (%2)'
  9065     ignoredReceiverClasses notNil ifTrue:[
  8942                                 bindWith:ignoredReceiverClasses size
  9066         aStream nextPutAll:(' for %1 classes (%2)'
  8943                                 with:((ignoredReceiverClasses collect:[:each | each name] as:OrderedCollection) asStringWith:', '))
  9067                             bindWith:ignoredReceiverClasses size
  8944         ] ifFalse:[
  9068                             with:((ignoredReceiverClasses collect:[:each | each name] as:OrderedCollection) asStringWith:', ')).
  8945             ignoreUntilShiftKeyPressed == true ifTrue:[
  9069         ^ self.
  8946                 aStream nextPutAll:' until shiftKey pressed'.
  9070     ].
  8947             ] ifFalse:[
  9071     ignoreUntilShiftKeyPressed == true ifTrue:[
  8948                 ignoreEndTime notNil ifTrue:[
  9072         aStream nextPutAll:' until shiftKey pressed'.
  8949                     aStream nextPutAll:' until '.
  9073         ^ self.
  8950                     ignoreEndTime printOn:aStream.
  9074     ].
  8951                 ] ifFalse:[
  9075     ignoreEndTime notNil ifTrue:[
  8952                     (ignoreCount notNil) ifTrue:[
  9076         aStream nextPutAll:' until '.
  8953                         (ignoreCount > 0) ifTrue:[
  9077         ignoreEndTime printOn:aStream.
  8954                             aStream nextPutAll:' for '.
  9078         ^ self.
  8955                             ignoreCount printOn:aStream.
  9079     ].
  8956                         ] ifFalse:[
  9080     (ignoreCount notNil) ifTrue:[
  8957                             (ignoreCount < 0) ifTrue:[
  9081         (ignoreCount > 0) ifTrue:[
  8958                                 aStream nextPutAll:' forEver'.
  9082             aStream nextPutAll:' for '.
  8959                             ] ifFalse:[
  9083             ignoreCount printOn:aStream.
  8960                                 aStream nextPutAll:' no longer'.
  9084             ^ self.
  8961                             ].
  9085         ].
  8962                         ].
  9086         (ignoreCount < 0) ifTrue:[
  8963                     ]
  9087             aStream nextPutAll:' forEver'.
  8964                 ].
  9088             ^ self.
  8965             ].
  9089         ].
  8966         ].
  9090         aStream nextPutAll:' no longer'.
  8967     ].
  9091     ].
  8968 
       
  8969     "Modified: / 27-01-2012 / 11:43:10 / cg"
       
  8970     "Created: / 06-03-2012 / 12:41:10 / cg"
       
  8971 ! !
  9092 ! !
  8972 
  9093 
  8973 !DebugView::IgnoredHaltOrBreakpoint methodsFor:'queries'!
  9094 !DebugView::IgnoredHaltOrBreakpoint methodsFor:'queries'!
  8974 
  9095 
  8975 haltIgnoredInfoString
  9096 haltIgnoredInfoString
  9164 "/    Transcript showCR:ignoredProcesses.
  9285 "/    Transcript showCR:ignoredProcesses.
  9165 "/    Transcript showCR:Processor activeProcess.
  9286 "/    Transcript showCR:Processor activeProcess.
  9166     ignoredProcesses notNil ifTrue:[
  9287     ignoredProcesses notNil ifTrue:[
  9167         ^ ignoredProcesses includes:(Processor activeProcess)
  9288         ^ ignoredProcesses includes:(Processor activeProcess)
  9168     ].
  9289     ].
  9169 
  9290     ignoredSendingClassAndSelectors notNil ifTrue:[
  9170     ^ self isHaltIgnored
  9291         context withAllSendersDo:[:each |
       
  9292             |m className selector cls|
       
  9293 
       
  9294             (m := each method) notNil ifTrue:[
       
  9295                 cls := m mclass.
       
  9296                 cls notNil ifTrue:[
       
  9297                     className := cls name.
       
  9298                     selector := m selector.
       
  9299                     (ignoredSendingClassAndSelectors contains:[:entry | entry first = className and:[entry second = selector]])
       
  9300                         ifTrue:[^ true].
       
  9301                 ].
       
  9302             ]
       
  9303         ]
       
  9304     ].
       
  9305 
       
  9306     ^ self isHaltIgnored  "/ unconditionally
  9171 ! !
  9307 ! !
  9172 
  9308 
  9173 !DebugView::IgnoredBreakpoint methodsFor:'accessing'!
  9309 !DebugView::IgnoredBreakpoint methodsFor:'accessing'!
  9174 
  9310 
  9175 parameter
  9311 parameter
  9204 ! !
  9340 ! !
  9205 
  9341 
  9206 !DebugView class methodsFor:'documentation'!
  9342 !DebugView class methodsFor:'documentation'!
  9207 
  9343 
  9208 version
  9344 version
  9209     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.659 2014-07-01 20:01:16 cg Exp $'
  9345     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.660 2014-07-08 15:20:38 cg Exp $'
  9210 !
  9346 !
  9211 
  9347 
  9212 version_CVS
  9348 version_CVS
  9213     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.659 2014-07-01 20:01:16 cg Exp $'
  9349     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.660 2014-07-08 15:20:38 cg Exp $'
  9214 !
  9350 !
  9215 
  9351 
  9216 version_SVN
  9352 version_SVN
  9217     ^ '$Id: DebugView.st,v 1.659 2014-07-01 20:01:16 cg Exp $'
  9353     ^ '$Id: DebugView.st,v 1.660 2014-07-08 15:20:38 cg Exp $'
  9218 ! !
  9354 ! !
  9219 
  9355 
  9220 
  9356 
  9221 DebugView initialize!
  9357 DebugView initialize!