DebugView.st
changeset 2591 613b7c72371c
parent 2589 2342403139a7
child 2633 41bd35e18e4e
equal deleted inserted replaced
2590:bc4befd23834 2591:613b7c72371c
   456     con := aContext.
   456     con := aContext.
   457     1 to:5 do:[:i |
   457     1 to:5 do:[:i |
   458         con isNil ifTrue:[^ 1].
   458         con isNil ifTrue:[^ 1].
   459 
   459 
   460         sel := con selector.
   460         sel := con selector.
       
   461         ((sel == #halt) or:[sel == #halt:]) ifTrue:[
       
   462             ^ i + 1
       
   463         ].
   461         ((sel == #raise) or:[sel == #raiseRequest]) ifTrue:[
   464         ((sel == #raise) or:[sel == #raiseRequest]) ifTrue:[
   462             rcvr := con receiver.
   465             rcvr := con receiver.
   463             (rcvr isKindOf:Exception) ifTrue:[
   466             (rcvr isKindOf:Exception) ifTrue:[
   464                 ex := rcvr.
   467                 ex := rcvr.
   465                 offset := i.
   468                 offset := i.
   487     found isNil ifTrue:[
   490     found isNil ifTrue:[
   488         "/ this is a kludge, but convenient.
   491         "/ this is a kludge, but convenient.
   489         "/ show the place where the divisionByZero happend,
   492         "/ show the place where the divisionByZero happend,
   490         "/ not where the signal was raised.
   493         "/ not where the signal was raised.
   491 
   494 
   492         sel := aContext selector.
   495         sel := aContext methodHome selector.
       
   496 
   493         (sel == #//      
   497         (sel == #//      
   494         or:[sel == #/
   498         or:[sel == #/
   495         or:[sel == #\\]]) ifTrue:[
   499         or:[sel == #\\]]) ifTrue:[
   496             ^ 2
   500             ^ 2
   497         ].
   501         ].
   507             ^ 2
   511             ^ 2
   508         ].
   512         ].
   509 
   513 
   510         "/ show the place of the halt; not where the HaltSignal
   514         "/ show the place of the halt; not where the HaltSignal
   511         "/ was raised...
   515         "/ was raised...
   512         (sel == #halt) ifTrue:[
   516         ((sel == #halt) or:[sel == #halt:]) ifTrue:[
   513             ^ 2
   517             ^ 2
   514         ].
   518         ].
   515 
   519 
   516         "/ show the place of error-call; not where the ErrorSignal
   520         "/ show the place of error-call; not where the ErrorSignal
   517         "/ was raised...
   521         "/ was raised...
   606      exclusive event loop on top of eveything else"
   610      exclusive event loop on top of eveything else"
   607 
   611 
   608     |con selection m idx retval enteredByInterrupt sel con1 con2 h
   612     |con selection m idx retval enteredByInterrupt sel con1 con2 h
   609      iAmNew|
   613      iAmNew|
   610 
   614 
       
   615 "/'entering: ' print. aContext printCR.
       
   616 "/'initial: ' print. initialSelectionOrNil printCR.
   611     iAmNew := drawableId isNil.
   617     iAmNew := drawableId isNil.
   612 
   618 
   613     verboseBacktrace := VerboseBacktraceDefault ? false.
   619     verboseBacktrace := VerboseBacktraceDefault ? false.
   614 
   620 
   615     busy := cachable := true.
   621     busy := cachable := true.
   686     windowGroup setProcess:Processor activeProcess.
   692     windowGroup setProcess:Processor activeProcess.
   687     "
   693     "
   688      get the walkback list; clear inspectors if we did not come here by single stepping)
   694      get the walkback list; clear inspectors if we did not come here by single stepping)
   689     "
   695     "
   690     self setContext:aContext releaseInspectors:(exitAction ~~ #step).
   696     self setContext:aContext releaseInspectors:(exitAction ~~ #step).
       
   697 "/'after setContext; first is ' print.
       
   698 "/(contextArray at:1 ifAbsent:nil) printCR.
   691 
   699 
   692     initialSelectionOrNil notNil ifTrue:[
   700     initialSelectionOrNil notNil ifTrue:[
   693         selection := initialSelectionOrNil
   701         selection := initialSelectionOrNil
   694     ] ifFalse:[
   702     ] ifFalse:[
   695         "
   703         "
   701            in the context where the raise actually occured.
   709            in the context where the raise actually occured.
   702         "
   710         "
   703         con1 := (contextArray at:1 ifAbsent:nil).
   711         con1 := (contextArray at:1 ifAbsent:nil).
   704         con2 := (contextArray at:2 ifAbsent:nil).
   712         con2 := (contextArray at:2 ifAbsent:nil).
   705         exitAction == #step ifTrue:[
   713         exitAction == #step ifTrue:[
   706 
       
   707             selection := 1.
   714             selection := 1.
   708             steppedContext notNil ifTrue:[
   715             steppedContext notNil ifTrue:[
   709             
   716             
   710                 "
   717                 "
   711                  if we came here by a big-step, show the method where we are
   718                  if we came here by a big-step, show the method where we are
  4257 ! !
  4264 ! !
  4258 
  4265 
  4259 !DebugView class methodsFor:'documentation'!
  4266 !DebugView class methodsFor:'documentation'!
  4260 
  4267 
  4261 version
  4268 version
  4262     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.259 2000-02-07 11:43:32 cg Exp $'
  4269     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.260 2000-02-08 15:55:38 cg Exp $'
  4263 ! !
  4270 ! !
  4264 DebugView initialize!
  4271 DebugView initialize!