DebugView.st
changeset 8143 539df8f4f32e
parent 8142 4ad36cbbcffb
child 8148 21180715dbe9
--- a/DebugView.st	Wed May 21 22:05:25 2008 +0200
+++ b/DebugView.st	Mon May 26 10:14:20 2008 +0200
@@ -790,6 +790,12 @@
 
         "/ show the place of the bad message; not where the Signal was raised...
         (sel == #doesNotUnderstand:) ifTrue:[
+            nMax > 2 ifTrue:[
+                sel := (aContextArray at:2) selector.
+                sel == #doesNotUnderstand: ifTrue:[
+                    ^ 4
+                ].
+            ].
             ^ 3 min:nMax
         ].
 
@@ -798,74 +804,44 @@
             ^ 2
         ].
 
-        "/ show the place of the halt; not where the HaltSignal was raised...
-        ((sel == #halt) or:[sel == #halt:]) ifTrue:[
-            ^ 2
-        ].
-
-        "/ show the place of the halt; not where the HaltSignal was raised...
-        (sel == #shouldImplement) ifTrue:[
-            ^ 2
-        ].
-
-        "/ show the place of error-call; not where the ErrorSignal was raised...
-        ((sel == #error:mayProceed:)
-        or:[ sel == #signalFailure:resumable:]) ifTrue:[
-            nMax > 2 ifTrue:[
-                sel := (aContextArray at:2) selector.
-                sel == #mustBeBoolean ifTrue:[
-                    ^ 3
-                ].
-                sel == #assert:message: ifTrue:[
-                    nMax > 3 ifTrue:[
-                        sel := (aContextArray at:3) selector.
-                        sel == #assert: ifTrue:[
-                            nMax > 4 ifTrue:[
-                                sel := (aContextArray at:4) selector.
-                                sel == #deny: ifTrue:[
-                                   ^ 5
-                                ]
-                            ].
-                            ^ 4
-                        ].
-                        ^ 3
-                    ].
-                    ^ 3
-                ].
-            ].
-            ^ 2
-        ].
+"/        "/ show the place of the halt; not where the HaltSignal was raised...
+"/        ((sel == #halt) or:[sel == #halt:]) ifTrue:[
+"/            ^ 2
+"/        ].
+
+"/        "/ show the place of the shouldImplement; not where the Signal was raised...
+"/        (sel == #shouldImplement) ifTrue:[
+"/            ^ 2
+"/        ].
+
+"/        "/ show the place of error-call; not where the ErrorSignal was raised...
+"/        ((sel == #error:mayProceed:)
+"/        or:[ sel == #signalFailure:resumable:]) ifTrue:[
+"/            nMax > 2 ifTrue:[
+"/                sel := (aContextArray at:2) selector.
+"/                sel == #mustBeBoolean ifTrue:[
+"/                    ^ 3
+"/                ].
+"/            ].
+"/            ^ 2
+"/        ].
 
         "/ show the place of signalInterrupt-call; not where the Signal was raised...
         (sel == #signalInterrupt:) ifTrue:[
             ^ 2
         ].
 
-        "/ show the place of error-call; not where the ErrorSignal was raised...
-        ((sel == #error) or:[sel == #error:]) ifTrue:[
-            con method mclass == Object ifTrue:[
-                ^ 2
-            ]
-        ].
-
-        "/ show the place of the assert; not where the Signal was raised...
-        ((sel == #assert:) or:[sel == #assert:message:]) ifTrue:[
-            nMax > 2 ifTrue:[
-                sel2 := (aContextArray at:2) selector.
-                ((sel2 == #assert:) or:[sel2 == #assert:message:])ifTrue:[
-                    ^ 3
-                ].
-                sel2 == #deny: ifTrue:[
-                    ^ 3
-                ].
-            ].
-            ^ 2
-        ].
-
-        "/ show the place of the send; not where the Signal was raised...
-        (sel == #subclassResponsibility) ifTrue:[
-            ^ 2
-        ].
+"/        "/ show the place of error-call; not where the ErrorSignal was raised...
+"/        ((sel == #error) or:[sel == #error:]) ifTrue:[
+"/            con method mclass == Object ifTrue:[
+"/                ^ 2
+"/            ]
+"/        ].
+
+"/        "/ show the place of the send; not where the Signal was raised...
+"/        (sel == #subclassResponsibility) ifTrue:[
+"/            ^ 2
+"/        ].
 
         "/ show the place of the bad index; not where the Signal was raised...
         ( #(#notIndexed 
@@ -902,7 +878,23 @@
             ^ idx
         ].
 
-        ^ 1
+        "/ the above is all too hard-coded;
+        "/ ask the method, if it thinks it should be skipped in the walkback.
+        "/ as more methods get flagged, remove code from above.
+        offset := 1.
+        con := aContextArray at:offset ifAbsent:nil.
+
+        [ 
+          con notNil
+          and:[ con methodHome notNil
+          and:[ con methodHome method notNil
+          and:[ con methodHome method shouldBeSkippedInDebuggersWalkBack ]]]
+        ] whileTrue:[
+Transcript showCR:con methodHome method.
+            offset := offset + 1.
+            con := aContextArray at:offset ifAbsent:nil.
+        ].
+        ^ offset
     ].
 
     con := found.
@@ -6092,7 +6084,7 @@
 !DebugView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.429 2008-05-21 20:05:25 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.430 2008-05-26 08:14:20 cg Exp $'
 ! !
 
 DebugView initialize!