MiniDebugger.st
changeset 7701 81a948fdd026
parent 7477 b190b8548cef
child 7705 76a504c1e6a8
--- a/MiniDebugger.st	Mon Oct 27 19:03:45 2003 +0100
+++ b/MiniDebugger.st	Mon Oct 27 21:09:18 2003 +0100
@@ -312,6 +312,19 @@
     ^ nil
 !
 
+garbageCollectCommand:id
+    id == 3 ifTrue:[
+        ObjectMemory reclaimSymbols.
+        ObjectMemory compressOldSpace.
+    ] ifFalse:[
+        id == 2 ifTrue:[
+            ObjectMemory reclaimSymbols.
+        ] ifFalse:[
+            ObjectMemory garbageCollect.
+        ]
+    ]
+!
+
 getContext
     |backtrace|
     backtrace := thisContext.
@@ -545,16 +558,7 @@
 
         (cmd == $g) ifTrue:[
             valid := true. 
-            id == 3 ifTrue:[
-                ObjectMemory reclaimSymbols.
-                ObjectMemory compressOldSpace.
-            ] ifFalse:[
-                id == 2 ifTrue:[
-                    ObjectMemory reclaimSymbols.
-                ] ifFalse:[
-                    ObjectMemory garbageCollect.
-                ]
-            ]
+            self garbageCollectCommand:id
         ].
 
         (cmd == $U) ifTrue:[valid := true. MessageTracer unwrapAllMethods].
@@ -570,47 +574,7 @@
         or:[cmd == Character linefeed]) ifTrue:[valid := true.].
 
         valid ifFalse: [
-            'valid commands:
-   c ..... continue
-   s ..... step
-   t ..... trace (continue with trace)
-   a [id]. abort (i.e. raise abort signal) in (current) process
-   T [id]. terminate (current) process
-   W [id]. stop (current) process
-   R [id]. resume (current) process
-   Q [id]. quick terminate (current) process - no unwinds or cleanup
-
-   P ..... list processes
-   l [id]. print context chain (of process with id)
-   b [id]. full (VM) backtrace
-   B ..... backtrace of all other processes
-
-   U ..... unwrap all traced/breakpointed methods
-   g ..... collect all garbage
-   g 2.... collect all garbage & reclaim symbols
-   g 3.... collect all garbage, reclaim symbols and compress
-
-   S ..... save snapshot into crash.img
-   X ..... exit (+core)
-   x ..... exit Smalltalk
-
-   . ..... print dot (the current context)
-   - ..... move dot up
-   + ..... move dot down
-
-   r ..... receiver (in dot) printString
-   i ..... inspect receiver (in dot)
-   I ..... interpreter (expression evaluator)
-
-   To repair a broken X-Connection, enter an interpreter and evaluate:
-      Display := XWorkstation new.
-      Display initializeFor:''hostName:0''.
-      Display startDispatch.
-      NewLauncher openOnDevice:Display.
-      <empty line>
-   then enter ''c'' to continue; a NewLauncher should pop up soon.
-
-'  errorPrintCR
+            self showValidCommandHelp.
         ]
     ].
     context := nil.
@@ -773,10 +737,54 @@
     ]
 
     "Modified: / 31.7.1998 / 16:30:19 / cg"
+!
+
+showValidCommandHelp
+        'valid commands:
+   c ..... continue
+   s ..... step
+   t ..... trace (continue with trace)
+   a [id]. abort (i.e. raise abort signal) in (current) process
+   T [id]. terminate (current) process
+   W [id]. stop (current) process
+   R [id]. resume (current) process
+   Q [id]. quick terminate (current) process - no unwinds or cleanup
+
+   P ..... list processes
+   l [id]. print context chain (of process with id)
+   b [id]. full (VM) backtrace
+   B ..... backtrace of all other processes
+
+   U ..... unwrap all traced/breakpointed methods
+   g ..... collect all garbage
+   g 2.... collect all garbage & reclaim symbols
+   g 3.... collect all garbage, reclaim symbols and compress
+
+   S ..... save snapshot into crash.img
+   x ..... exit Smalltalk
+   X ..... exit Smalltalk (+core dump)
+
+   . ..... print dot (the current context)
+   - ..... move dot up
+   + ..... move dot down
+
+   r ..... receiver (in dot) printString
+   i ..... inspect receiver (in dot)
+   I ..... interpreter (expression evaluator)
+
+   To repair a broken X-Connection, enter an interpreter and evaluate:
+      Display := XWorkstation new.
+      Display initializeFor:''hostName:0''.
+      Display startDispatch.
+      NewLauncher openOnDevice:Display.
+      <empty line>
+   then enter ''c'' to continue; a NewLauncher should pop up soon.
+
+'  errorPrintCR
 ! !
 
 !MiniDebugger class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/MiniDebugger.st,v 1.59 2003-07-07 10:07:47 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/MiniDebugger.st,v 1.60 2003-10-27 20:09:18 cg Exp $'
 ! !