DebugView.st
changeset 4871 ae57e3103b0b
parent 4867 269d62a1ed27
child 4892 f7b6afd8cec9
--- a/DebugView.st	Wed May 07 17:21:32 2003 +0200
+++ b/DebugView.st	Wed May 07 21:03:12 2003 +0200
@@ -138,7 +138,32 @@
     |active|
 
     StepInterruptPending := nil.
-
+    thisContext isRecursive ifTrue:[
+        |foundNoByteCodeContext c|
+    
+        "/ care for the special case, were the Debugger was autoloaded.
+        "/ in this case, thisContext IS recursive, but thats no error
+        "/ condition.
+        foundNoByteCodeContext := false.
+        c := thisContext findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:nil.
+        [foundNoByteCodeContext not
+         and:[c notNil 
+         and:[c selector ~~ #enter:withMessage:mayProceed:]]] whileTrue:[
+            c selector == #noByteCode ifTrue:[
+                foundNoByteCodeContext := true
+            ].
+            c := c findNextContextWithSelector:#enter:withMessage:mayProceed: or:#noByteCode or:nil.
+        ].
+
+        foundNoByteCodeContext ifFalse:[
+            ('DebugView [warning]: reentered') errorPrintCR.
+
+            ^ MiniDebugger 
+                enter:aContext
+                withMessage:'DebugView [error]: recursive error (in debugger)'
+                mayProceed:mayProceed.
+        ]
+    ].
     ControlInterrupt handle:[:ex |
         'DebugView [info]: breakpoint in debugger setup ignored [enter.]' infoPrintCR.
         ('DebugView [info]: breakpoint on:' , ex suspendedContext printString) infoPrintCR.
@@ -5841,7 +5866,7 @@
 !DebugView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.340 2003-05-07 14:52:53 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.341 2003-05-07 19:03:12 stefan Exp $'
 ! !
 
 DebugView initialize!