more context hiding in dense-walkback mode
authorClaus Gittinger <cg@exept.de>
Fri, 16 Jan 1998 16:24:11 +0100
changeset 1394 7765db9114ff
parent 1393 3aac5b288ef1
child 1395 1c7f8d3794f7
more context hiding in dense-walkback mode
DebugView.st
--- a/DebugView.st	Fri Jan 16 16:22:13 1998 +0100
+++ b/DebugView.st	Fri Jan 16 16:24:11 1998 +0100
@@ -10,6 +10,8 @@
  hereby transferred.
 "
 
+'From Smalltalk/X, Version:3.3.1 on 14-jan-1998 at 12:11:31 am'                 !
+
 StandardSystemView subclass:#DebugView
 	instanceVariableNames:'busy haveControl exitAction canContinue contextView codeView
 		receiverInspector contextInspector contextArray selectedContext
@@ -940,6 +942,7 @@
 
 	    ObjectMemory flushInlineCaches.
 
+	    enteredByInterrupt printCR.
 	    enteredByInterrupt ifTrue:[
 		"/ dont want to step through all intermediate
 		"/ (scheduler-) contexts; place a return-trap on the
@@ -974,7 +977,7 @@
 
     "Modified: / 17.4.1997 / 13:01:32 / stefan"
     "Created: / 30.10.1997 / 21:08:18 / cg"
-    "Modified: / 30.10.1997 / 21:31:49 / cg"
+    "Modified: / 13.1.1998 / 15:28:53 / cg"
 !
 
 openOn:aProcess
@@ -1481,9 +1484,10 @@
     DebuggingDebugger == true ifTrue:[
 	'stepIRQ' printCR.
     ].
+    Processor yield.
     ^ self stepOrNext
 
-    "Modified: 14.10.1996 / 13:30:56 / cg"
+    "Modified: / 13.1.1998 / 21:14:11 / cg"
 !
 
 stepOrNext
@@ -2293,7 +2297,9 @@
 
 	inWrap := false.
 	method := con method.
-	(method notNil and:[method isWrapped]) ifTrue:[
+	(method notNil 
+	and:[method isWrapped
+	and:[method originalMethod ~~ method]]) ifTrue:[
 	    inWrap := true
 	].
 
@@ -2314,7 +2320,7 @@
 	stepButton turnOff. nextButton turnOff. sendButton turnOff.
     ]
 
-    "Modified: 6.3.1997 / 21:11:38 / cg"
+    "Modified: / 13.1.1998 / 15:34:14 / cg"
 !
 
 doStop
@@ -2473,13 +2479,13 @@
     implementorClass := selectedContext methodClass. 
     implementorClass notNil ifTrue:[
 	method := implementorClass compiledMethodAt:selectedContext selector.
-	(method notNil and:[method isWrapped]) ifTrue:[
-	    MessageTracer unwrapMethod:method
+	(method notNil and:[method isBreakpointed]) ifTrue:[
+	    method clearBreakPoint
 	]
     ].
     contextView middleButtonMenu disable:#removeBreakpoint.
 
-    "Modified: 21.9.1997 / 11:38:32 / cg"
+    "Modified: / 13.1.1998 / 00:24:47 / cg"
 !
 
 senders
@@ -2584,6 +2590,9 @@
 !
 
 redisplayBacktrace
+    "force redisplay of the walkBack list; invoked when the
+     verbose-flag setting is changed"
+
     |oldSelection oldContext con idx|
 
     contextArray notNil ifTrue:[
@@ -2595,7 +2604,10 @@
 
 	    con := firstContext.
 "/            con := contextArray at:1.
-	    contextArray at:1 put:nil.
+	    "/ force redeisplay, even if same by changing the first entry
+	    contextArray size > 0 ifTrue:[
+		contextArray at:1 put:nil.
+	    ].
 	    self setContext:con.
 
 	    oldContext isNil ifTrue:[
@@ -2610,8 +2622,8 @@
 	]
     ]
 
-    "Created: 10.1.1997 / 21:36:46 / cg"
-    "Modified: 12.1.1997 / 01:24:17 / cg"
+    "Created: / 10.1.1997 / 21:36:46 / cg"
+    "Modified: / 15.1.1998 / 19:45:09 / cg"
 !
 
 setContext:aContext
@@ -2627,7 +2639,7 @@
 
     |con text method caller caller2 m count showIt c suspendContext nm h|
 
-    (contextArray notNil and:[aContext == (contextArray at:1)]) ifTrue:[
+    (contextArray size > 0 and:[aContext == (contextArray at:1)]) ifTrue:[
 	"no change"
 	^ false
     ].
@@ -2790,7 +2802,7 @@
     ^ true
 
     "Created: / 14.12.1995 / 19:10:31 / cg"
-    "Modified: / 30.10.1997 / 22:17:18 / cg"
+    "Modified: / 15.1.1998 / 19:45:35 / cg"
 !
 
 setContextSkippingInterruptContexts:aContext
@@ -2838,8 +2850,8 @@
 showingContext:aContext
     "return false, if this context is to be skipped.
      Here, we hide some wellKnown methods, which are usually
-     not too interesting; the set of methods which are suppressed
-     is my (claus's) own choice."
+     not too interesting; 
+     the set of methods which are suppressed is my (claus's) own choice."
 
     |sel rec mClass 
      sender senderReceiver senderSelector senderReceiverClass|
@@ -2922,6 +2934,12 @@
 "/                ^ false
 "/            ]
 "/        ]
+
+	aContext home notNil ifTrue:[
+	    (aContext home receiver isMemberOf:Semaphore) ifTrue:[
+		(aContext home selector == #wait) ifTrue:[^ false]
+	    ]
+	]
     ].
 
     ((mClass == Signal) 
@@ -2929,15 +2947,34 @@
     or:[mClass == SignalSet]]
     ) ifTrue:[
 	sel == #handle:do: ifTrue:[^ false].
+	sel == #raise ifTrue:[^ false].
     ].
     (mClass == QuerySignal) ifTrue:[
 	sel == #answer:do: ifTrue:[^ false].
     ].
-
+    (mClass == Exception) ifTrue:[
+	sel == #doRaise ifTrue:[^ false].
+	sel == #doCallHandler: ifTrue:[^ false].
+	sel == #raise ifTrue:[
+	    senderReceiverClass == Signal ifTrue:[^ false].
+	]
+    ].
+    (mClass == Context) ifTrue:[
+	sel == #unwind ifTrue:[^ false].
+	sel == #unwind: ifTrue:[^ false].
+    ].
+    (mClass == ProcessorScheduler) ifTrue:[
+	sel == #interruptActive ifTrue:[^ false].
+	sel == #threadSwitch: ifTrue:[^ false].
+	sel == #suspend: ifTrue:[^ false].
+    ].
+    mClass == Process ifTrue:[
+	sel == #suspendWithState: ifTrue:[^ false].
+    ].
     ^ true.
 
     "Created: / 10.1.1997 / 21:01:39 / cg"
-    "Modified: / 7.1.1998 / 11:04:01 / cg"
+    "Modified: / 15.1.1998 / 19:47:36 / cg"
 !
 
 stepping 
@@ -3435,7 +3472,12 @@
 	    "
 	     give it to the (lower right) inspector
 	    "
-	    contextInspector inspect:con.
+"/            Object errorSignal handle:[:ex |
+"/                'DebugView [warning]: error while accessing context' errorPrintCR.
+"/                contextInspector inspect:nil.
+"/            ] do:[
+		contextInspector inspect:con.
+"/            ].
 
 	    "/ show a stack inspector sometimes
 
@@ -3699,13 +3741,13 @@
 	].
     ]
 
-    "Created: 14.8.1997 / 20:15:00 / cg"
-    "Modified: 19.10.1997 / 01:20:58 / cg"
+    "Created: / 14.8.1997 / 20:15:00 / cg"
+    "Modified: / 13.1.1998 / 15:36:32 / cg"
 ! !
 
 !DebugView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.182 1998-01-12 13:30:13 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/DebugView.st,v 1.183 1998-01-16 15:24:11 cg Exp $'
 ! !
 DebugView initialize!