DebugView.st
changeset 4947 c600f7430132
parent 4932 0758cd0b8ce9
child 5088 76eec92d5511
equal deleted inserted replaced
4946:025ab5b349c5 4947:c600f7430132
  1453 
  1453 
  1454         ex proceed
  1454         ex proceed
  1455     ] do:[
  1455     ] do:[
  1456         con := thisContext sender.
  1456         con := thisContext sender.
  1457         [   
  1457         [   
  1458             (con selector ~~ #enter:select:)
  1458             (con selector == #enter:select:)
  1459             or:[con receiver ~~ self]
  1459             and:[con receiver == self]
  1460         ]
  1460         ]
  1461         whileTrue:[ con := con sender ].
  1461         whileFalse:[ con := con sender ].
  1462 
  1462 
  1463         con unwindThenDo:[AbortOperationRequest raise].
  1463         con unwindThenDo:[AbortOperationRequest raise].
  1464 "/        AbortOperationRequest raise.
  1464 "/        AbortOperationRequest raise.
  1465     ].
  1465     ].
  1466     'DebugView [warning]: abort failed' errorPrintCR
  1466     'DebugView [warning]: abort failed' errorPrintCR
  5462         s nextPutAll: '**** '; nextPutLine:(ex description withCRs).
  5462         s nextPutAll: '**** '; nextPutLine:(ex description withCRs).
  5463         s nextPutLine:'****'.
  5463         s nextPutLine:'****'.
  5464         con := ex suspendedContext.
  5464         con := ex suspendedContext.
  5465         s nextPutAll: '**** '; nextPutLine:(con printString).
  5465         s nextPutAll: '**** '; nextPutLine:(con printString).
  5466         con := con sender.
  5466         con := con sender.
  5467         [con notNil] whileTrue:[
  5467 
  5468             Error catch:[:ex |
  5468         con fullPrintAllOn:s.
  5469                 s nextPutAll: '**** '; nextPutLine:(con printString).
  5469 
  5470             ].
  5470 "/        [con notNil] whileTrue:[
  5471 
  5471 "/            Error catch:[:ex |
  5472             con receiver == self ifTrue:[
  5472 "/                s nextPutAll: '**** '; nextPutLine:(con printString).
  5473                 con := nil
  5473 "/            ].
  5474             ] ifFalse:[
  5474 "/
  5475                 con := con sender.
  5475 "/            (con receiver == self and:[con selector == #'enter:select:']) ifTrue:[
  5476             ]
  5476 "/                con := nil
  5477         ].
  5477 "/            ] ifFalse:[
       
  5478 "/                con := con sender.
       
  5479 "/            ]
       
  5480 "/        ].
  5478         codeView contents:(s contents).
  5481         codeView contents:(s contents).
  5479         ex return.
  5482         ex return.
  5480     ] do:[
  5483     ] do:[
  5481         self doShowSelection:lineNr
  5484         self doShowSelection:lineNr
  5482     ]
  5485     ]
  5638                              valueWithReceiver kind of method invocation;
  5641                              valueWithReceiver kind of method invocation;
  5639                              if so, grab the method from the sender and show it
  5642                              if so, grab the method from the sender and show it
  5640                             "
  5643                             "
  5641                             
  5644                             
  5642                             ((sender := homeContext sender) notNil
  5645                             ((sender := homeContext sender) notNil
  5643                             and:[(sender selector startsWith:'valueWithReceiver:')
  5646                             and:[((sender selector ? '') startsWith:'valueWithReceiver:')
  5644                             and:[sender receiver isMethod]]) ifTrue:[
  5647                             and:[sender receiver isMethod]]) ifTrue:[
  5645                                 method := sender receiver.
  5648                                 method := sender receiver.
  5646                                 self sensor shiftDown ifTrue:[
  5649                                 self sensor shiftDown ifTrue:[
  5647                                     code := method decompiledSource
  5650                                     code := method decompiledSource
  5648                                 ] ifFalse:[
  5651                                 ] ifFalse:[
  5670                 errMsg := nil.
  5673                 errMsg := nil.
  5671                 method isNil ifTrue:[
  5674                 method isNil ifTrue:[
  5672                     "/ fall back heuristics
  5675                     "/ fall back heuristics
  5673                     con isBlockContext ifTrue:[
  5676                     con isBlockContext ifTrue:[
  5674                         ((sender := con sender) notNil
  5677                         ((sender := con sender) notNil
  5675                         and:[(sender selector startsWith:'value')
  5678                         and:[((sender selector ? '') startsWith:'value')
  5676                         and:[sender receiver isBlock]]) ifTrue:[
  5679                         and:[sender receiver isBlock]]) ifTrue:[
  5677                             code := sender receiver source.
  5680                             code := sender receiver source.
  5678                         ]
  5681                         ]
  5679                     ].
  5682                     ].
  5680                 ].
  5683                 ].
  5890 ! !
  5893 ! !
  5891 
  5894 
  5892 !DebugView class methodsFor:'documentation'!
  5895 !DebugView class methodsFor:'documentation'!
  5893 
  5896 
  5894 version
  5897 version
  5895     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.343 2003-05-28 08:23:53 cg Exp $'
  5898     ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.344 2003-06-03 18:34:52 cg Exp $'
  5896 ! !
  5899 ! !
  5897 
  5900 
  5898 DebugView initialize!
  5901 DebugView initialize!