DebugView.st
changeset 6622 cf89940b5d30
parent 6616 b8c6a5cf6522
child 6647 89560e789618
equal deleted inserted replaced
6621:698c7e5ff1c3 6622:cf89940b5d30
    24 		steppedContextLineno stepForReturn actualContext inWrap
    24 		steppedContextLineno stepForReturn actualContext inWrap
    25 		stackInspector steppedContext wrapperContext verboseBacktrace
    25 		stackInspector steppedContext wrapperContext verboseBacktrace
    26 		firstContext stepHow cachable currentMethod ignoreBreakpoints
    26 		firstContext stepHow cachable currentMethod ignoreBreakpoints
    27 		stepUntilEntering lastStepUntilEntering
    27 		stepUntilEntering lastStepUntilEntering
    28 		lastSelectionInReceiverInspector lastSelectionInContextInspector
    28 		lastSelectionInReceiverInspector lastSelectionInContextInspector
    29 		canShowMore exitAbort reportButton'
    29 		canShowMore exitAbort reportButton setOfHiddenCallingSelectors'
    30 	classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail
    30 	classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail
    31 		DebuggingDebugger VerboseBacktraceDefault DefaultIcon
    31 		DebuggingDebugger VerboseBacktraceDefault DefaultIcon
    32 		DefaultDebuggerBackgroundColor InitialNCHAINShown'
    32 		DefaultDebuggerBackgroundColor InitialNCHAINShown'
    33 	poolDictionaries:''
    33 	poolDictionaries:''
    34 	category:'Interface-Debugger'
    34 	category:'Interface-Debugger'
  4243 
  4243 
  4244 findNodeForInterval:interval
  4244 findNodeForInterval:interval
  4245     |tree node source|
  4245     |tree node source|
  4246 
  4246 
  4247     interval isEmpty ifTrue: [^ nil].
  4247     interval isEmpty ifTrue: [^ nil].
       
  4248     RBParser isNil ifTrue:[^ nil].
  4248 
  4249 
  4249     source := codeView contents asString string.
  4250     source := codeView contents asString string.
  4250     source := currentMethod source.
  4251     source := currentMethod source.
  4251 
  4252 
  4252     Error handle:[:ex |
  4253     Error handle:[:ex |
  4544             "/ (its dummy anyway) and fake that contexts name
  4545             "/ (its dummy anyway) and fake that contexts name
  4545 
  4546 
  4546             verboseBacktrace ~~ true ifTrue:[
  4547             verboseBacktrace ~~ true ifTrue:[
  4547                 (con isBlockContext
  4548                 (con isBlockContext
  4548                  and:[(h := con home) == con sender
  4549                  and:[(h := con home) == con sender
  4549                  and:[((h selector == #doIt)
  4550                  and:[(self setOfHiddenCallingSelectors includes:h selector)
  4550                        or:[h selector == #doIt:])
       
  4551                  and:[h method who isNil]]]) ifTrue:[
  4551                  and:[h method who isNil]]]) ifTrue:[
  4552                     calledContext := con.
  4552                     calledContext := con.
  4553                     con := con sender.
  4553                     con := con sender.
  4554                     text removeLast.
  4554                     text removeLast.
  4555                     text add:(con methodHome printString).
  4555                     text add:(con methodHome printString).
  4557                 h := nil.  "/ never keep refs to contexts unless you really need them ...
  4557                 h := nil.  "/ never keep refs to contexts unless you really need them ...
  4558             ].
  4558             ].
  4559 
  4559 
  4560             "/ with dense backtrace, dont show below the doIt
  4560             "/ with dense backtrace, dont show below the doIt
  4561             ( verboseBacktrace ~~ true
  4561             ( verboseBacktrace ~~ true
  4562             and:[ con selector == #doIt]) ifTrue:[
  4562             and:[ (self setOfHiddenCallingSelectors includes:con selector) ]) ifTrue:[
  4563                 con := nil.  
  4563                 con := nil.  
  4564             ] ifFalse:[
  4564             ] ifFalse:[
  4565                 calledContext := con.
  4565                 calledContext := con.
  4566                 con := con sender
  4566                 con := con sender
  4567             ]
  4567             ]
  4947 
  4947 
  4948 !DebugView methodsFor:'private queries'!
  4948 !DebugView methodsFor:'private queries'!
  4949 
  4949 
  4950 isAborting
  4950 isAborting
  4951     ^ exitAction == #abort
  4951     ^ exitAction == #abort
       
  4952 !
       
  4953 
       
  4954 setOfHiddenCallingSelectors
       
  4955     ^ setOfHiddenCallingSelectors ? #( #'doIt' #'doIt:' )
       
  4956 !
       
  4957 
       
  4958 setOfHiddenCallingSelectors:aCollectionOfSymbols
       
  4959     setOfHiddenCallingSelectors := aCollectionOfSymbols
  4952 ! !
  4960 ! !
  4953 
  4961 
  4954 !DebugView methodsFor:'private-cache handling'!
  4962 !DebugView methodsFor:'private-cache handling'!
  4955 
  4963 
  4956 cacheMyself
  4964 cacheMyself
  5969 ! !
  5977 ! !
  5970 
  5978 
  5971 !DebugView class methodsFor:'documentation'!
  5979 !DebugView class methodsFor:'documentation'!
  5972 
  5980 
  5973 version
  5981 version
  5974     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.393 2006-03-02 19:23:51 cg Exp $'
  5982     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.394 2006-03-03 19:06:19 cg Exp $'
  5975 ! !
  5983 ! !
  5976 
  5984 
  5977 DebugView initialize!
  5985 DebugView initialize!