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 |
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 |
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 |