#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Sat, 05 Nov 2016 13:24:54 +0100
changeset 20843 e144b279147d
parent 20842 57ae16d01413
child 20844 a1191adb52dc
#REFACTORING by cg class: MiniDebugger changed:17 methods
MiniDebugger.st
--- a/MiniDebugger.st	Sat Nov 05 13:24:47 2016 +0100
+++ b/MiniDebugger.st	Sat Nov 05 13:24:54 2016 +0100
@@ -96,25 +96,25 @@
         ex return
     ] do:[
         thisContext isRecursive ifTrue:[
-            "/ 'recursive lowLevelError in debugger ignored' lowLevelErrorPrintCR.
+            "/ 'recursive _error in debugger ignored' _errorPrintCR.
             ^ self
         ].
 
-        aString lowLevelErrorPrintCR.
+        aString _errorPrintCR.
         Processor notNil ifTrue:[
             active := Processor activeProcess.
-            'process: id=' lowLevelErrorPrint. active id lowLevelErrorPrint.
-            ' name=' lowLevelErrorPrint. active name lowLevelErrorPrintCR.
+            'process: id=' _errorPrint. active id _errorPrint.
+            ' name=' _errorPrint. active name _errorPrintCR.
 
-            'context: ' lowLevelErrorPrint. aContext printString lowLevelErrorPrintCR.
+            'context: ' _errorPrint. aContext printString _errorPrintCR.
             (con := aContext) notNil ifTrue:[
                 con := con sender.
-                ' ......: ' lowLevelErrorPrint. con printString lowLevelErrorPrintCR.
+                ' ......: ' _errorPrint. con printString _errorPrintCR.
                 [con notNil] whileTrue:[
                     sender := con sender.
                     (sender notNil and:[sender selector == con selector]) ifTrue:[
-                        ' ......: ' lowLevelErrorPrint. sender printString lowLevelErrorPrintCR.
-                        ' ......:  [** intermediate recursive contexts skipped **]' lowLevelErrorPrintCR.
+                        ' ......: ' _errorPrint. sender printString _errorPrintCR.
+                        ' ......:  [** intermediate recursive contexts skipped **]' _errorPrintCR.
                         [sender notNil
                          and:[sender selector == con selector
                          and:[sender method == con method]]] whileTrue:[
@@ -123,13 +123,13 @@
                         ].
                     ].
                     con := sender.
-                    ' ......: ' lowLevelErrorPrint. con printString lowLevelErrorPrintCR.
+                    ' ......: ' _errorPrint. con printString _errorPrintCR.
                 ]
             ]
         ].
         NotFirstTimeEntered ~~ true ifTrue:[
             NotFirstTimeEntered := true.
-            'Type "c" to proceed, "?" for help' lowLevelErrorPrintCR.
+            'Type "c" to proceed, "?" for help' _errorPrintCR.
         ].
     ].
 
@@ -137,11 +137,11 @@
         Error handle:[:ex |
             ex return
         ] do:[
-            self warn:('Unexpected lowLevelError:\' , aString , '\\No MiniDebugger functionality available') withCRs .
+            self warn:('Unexpected _error:\' , aString , '\\No MiniDebugger functionality available') withCRs .
         ].
 
         Error handle:[:ex |
-            'cannot raise Abort - exiting ...' lowLevelErrorPrintCR.
+            'cannot raise Abort - exiting ...' _errorPrintCR.
             OperatingSystem exit:10.
         ] do:[
             AbortOperationRequest raise.
@@ -228,7 +228,7 @@
 !
 
 trace:aBlock
-    self trace:aBlock with:[:where | where lowLevelErrorPrintCR]
+    self trace:aBlock with:[:where | where _errorPrintCR]
 
     "Modified: 20.5.1996 / 10:27:37 / cg"
 !
@@ -285,17 +285,17 @@
     stillHere := true.
     [stillHere] whileTrue:[
         AbortOperationRequest handle:[:ex |
-            '** Abort caught - back in previous debugLevel' lowLevelErrorPrintCR.
+            '** Abort caught - back in previous debugLevel' _errorPrintCR.
         ] do:[
             Error handle:[:ex |
                 StreamError handle:[:ex|
                     "You won't see this probably - but you will see it when doing a syscall trace"
-                    'Error while processing lowLevelError in MiniDebugger (Stdout closed?):' lowLevelErrorPrintCR.
-                    ex description lowLevelErrorPrintCR.
+                    'Error while processing _error in MiniDebugger (Stdout closed?):' _errorPrintCR.
+                    ex description _errorPrintCR.
                     OperatingSystem exit:10.
                 ] do:[
-                    'Error while executing MiniDebugger command: ' lowLevelErrorPrint.
-                    ex description lowLevelErrorPrintCR.
+                    'Error while executing MiniDebugger command: ' _errorPrint.
+                    ex description _errorPrintCR.
                     yesNo := self getCommand:'- (i)gnore / (p)roceed / (d)ebug / b(acktrace) ? '.
                     yesNo == $d ifTrue:[
                         MiniDebugger enterWithMessage:'Debugging debugger' mayProceed:true.
@@ -375,7 +375,7 @@
         where notNil ifTrue:[
             self printContext:where
         ] ifFalse:[
-            'stepInterrupt: no context' lowLevelErrorPrintCR
+            'stepInterrupt: no context' _errorPrintCR
         ].
         self enter:where mayProceed:true
     ] ifFalse:[
@@ -384,7 +384,7 @@
                 traceBlock value:where
             ]
         ] ifFalse:[
-            'traceInterrupt: no context' lowLevelErrorPrintCR
+            'traceInterrupt: no context' _errorPrintCR
         ].
         ObjectMemory flushInlineCaches.
         StepInterruptPending := 1.
@@ -470,7 +470,7 @@
         dot := c.
         "/ dot fullPrint.
     ] ifFalse:[
-        '** dot is the bottom of the calling chain' lowLevelErrorPrintCR.
+        '** dot is the bottom of the calling chain' _errorPrintCR.
     ].
 !
 
@@ -479,7 +479,7 @@
         dot := dot sender.
         "/ dot fullPrint.
     ] ifFalse:[
-        '** dot is the top of the calling chain' lowLevelErrorPrintCR.
+        '** dot is the top of the calling chain' _errorPrintCR.
     ].
 !
 
@@ -487,7 +487,7 @@
     |context n|
 
     aContext isNil ifTrue:[
-        'no context' lowLevelErrorPrintCR.
+        'no context' _errorPrintCR.
         ^ self
     ].
 
@@ -510,29 +510,29 @@
 
     "/ aContext fullPrint.
 
-    aContext receiverPrintString lowLevelErrorPrint. ' ' lowLevelErrorPrint. 
-    aContext selector asString lowLevelErrorPrint.
+    aContext receiverPrintString _errorPrint. ' ' _errorPrint. 
+    aContext selector asString _errorPrint.
     aContext argumentCount ~~ 0 ifTrue: [
-        ' ' lowLevelErrorPrint. aContext argsDisplayString lowLevelErrorPrint
+        ' ' _errorPrint. aContext argsDisplayString _errorPrint
     ].
-    ' [' lowLevelErrorPrint. 
-    aContext lineNumber asString lowLevelErrorPrint. 
-    ']' lowLevelErrorPrintCR
+    ' [' _errorPrint. 
+    aContext lineNumber asString _errorPrint. 
+    ']' _errorPrintCR
 !
 
 printDot
     self printContext:dot.
-    '  receiver: ' lowLevelErrorPrint. dot receiver printString lowLevelErrorPrintCR.
-    '  selector: ' lowLevelErrorPrint. dot selector lowLevelErrorPrintCR.
-    '  args: ' lowLevelErrorPrintCR.
+    '  receiver: ' _errorPrint. dot receiver printString _errorPrintCR.
+    '  selector: ' _errorPrint. dot selector _errorPrintCR.
+    '  args: ' _errorPrintCR.
     dot args keysAndValuesDo:[:idx :eachArg |
-        '    ' lowLevelErrorPrint. idx  printString lowLevelErrorPrint. 
-        ': ' lowLevelErrorPrint. eachArg printString lowLevelErrorPrintCR.
+        '    ' _errorPrint. idx  printString _errorPrint. 
+        ': ' _errorPrint. eachArg printString _errorPrintCR.
     ].
-    '  vars: ' lowLevelErrorPrintCR.
+    '  vars: ' _errorPrintCR.
     dot vars keysAndValuesDo:[:idx :eachVar |
-        '    ' lowLevelErrorPrint. idx  printString lowLevelErrorPrint. 
-        ': ' lowLevelErrorPrint. eachVar printString lowLevelErrorPrintCR.
+        '    ' _errorPrint. idx  printString _errorPrint. 
+        ': ' _errorPrint. eachVar printString _errorPrintCR.
     ].
 !
 
@@ -546,12 +546,12 @@
     home := dot methodHome.
     mthd := home method.
     mthd isNil ifTrue:[
-        '** no source **' lowLevelErrorPrintCR.
+        '** no source **' _errorPrintCR.
         ^ self.
     ].
     src := mthd source.
     src isNil ifTrue:[
-        '** no source **' lowLevelErrorPrintCR.
+        '** no source **' _errorPrintCR.
         ^ self.
     ].
     pcLineNr := dot lineNumber.
@@ -566,12 +566,12 @@
     ].
     startLnr to:stopLnr do:[:lNr |
         lNr == pcLineNr ifTrue:[
-            '>> ' lowLevelErrorPrint.
+            '>> ' _errorPrint.
         ] ifFalse:[
-            '   ' lowLevelErrorPrint.
+            '   ' _errorPrint.
         ].
-        (lNr printStringLeftPaddedTo:3) lowLevelErrorPrint. ' ' lowLevelErrorPrint.
-        (src at:lNr) asString lowLevelErrorPrintCR.
+        (lNr printStringLeftPaddedTo:3) _errorPrint. ' ' _errorPrint.
+        (src at:lNr) asString _errorPrintCR.
     ]
 !
 
@@ -613,7 +613,7 @@
 
     (sig := AbortOperationRequest) isHandled ifTrue:[
         sig raise.
-        'abort raise failed' lowLevelErrorPrintCR.
+        'abort raise failed' _errorPrintCR.
     ].
 
     "TEMPORARY kludge - find event handler context
@@ -626,10 +626,10 @@
     con notNil ifTrue:[
         "got it"
         con return.
-        'return failed' lowLevelErrorPrintCR.
+        'return failed' _errorPrintCR.
     ].
 
-    'found no context to resume' lowLevelErrorPrintCR.
+    'found no context to resume' _errorPrintCR.
 
     "Modified: / 16.11.2001 / 17:39:14 / cg"
 !
@@ -660,13 +660,13 @@
 
     (cmd == $w) ifTrue:[
         proc notNil ifTrue:[
-            '-------- walkback of process ' lowLevelErrorPrint. id lowLevelErrorPrint. ' -------' lowLevelErrorPrintCR.
+            '-------- walkback of process ' _errorPrint. id _errorPrint. ' -------' _errorPrintCR.
             self printBacktraceFrom:(proc suspendedContext)
         ] ifFalse:[
             id notNil ifTrue:[
-                'no process with id: ' lowLevelErrorPrint. id lowLevelErrorPrintCR.
+                'no process with id: ' _errorPrint. id _errorPrintCR.
             ] ifFalse:[
-                '-------- walkback of current process -------' lowLevelErrorPrintCR.
+                '-------- walkback of current process -------' _errorPrintCR.
                 self printBacktraceFrom:(self getContext)
             ]
         ].
@@ -675,7 +675,7 @@
 
     (cmd == $b) ifTrue:[
         proc notNil ifTrue:[
-            '-------- VM walkback of process ' lowLevelErrorPrint. id lowLevelErrorPrint. ' -------' lowLevelErrorPrintCR.
+            '-------- VM walkback of process ' _errorPrint. id _errorPrint. ' -------' _errorPrintCR.
             (Processor activeProcess environmentAt:#Stderr ifAbsent:Stderr) == Stderr ifTrue:[
                 ObjectMemory printStackBacktraceFrom:(proc suspendedContext)
             ] ifFalse:[
@@ -684,9 +684,9 @@
             ].    
         ] ifFalse:[
             id notNil ifTrue:[
-                'no process with id: ' lowLevelErrorPrint. id lowLevelErrorPrintCR.
+                'no process with id: ' _errorPrint. id _errorPrintCR.
             ] ifFalse:[
-                '-------- VM walkback of current process -------' lowLevelErrorPrintCR.
+                '-------- VM walkback of current process -------' _errorPrintCR.
                 (Processor activeProcess environmentAt:#Stderr ifAbsent:Stderr) == Stderr ifTrue:[
                     ObjectMemory printStackBacktrace
                 ] ifFalse:[
@@ -699,9 +699,9 @@
     ].
 
     (cmd == $S) ifTrue:[
-        'saving "crash.img"...' lowLevelErrorPrint.
+        'saving "crash.img"...' _errorPrint.
         ObjectMemory writeCrashImage.
-        'done.' lowLevelErrorPrintCR.
+        'done.' _errorPrintCR.
         ^ false
     ].
     (cmd == $C) ifTrue:[
@@ -712,7 +712,7 @@
         OperatingSystem isMSWINDOWSlike ifTrue:[ changesFilename replaceAll:$: with:$_ ].
 
         ChangeSet current fileOutAs: changesFilename.
-        ('saved session changes to "',changesFilename,'".') lowLevelErrorPrintCR.
+        ('saved session changes to "',changesFilename,'".') _errorPrintCR.
         ^ false
     ].
 
@@ -731,7 +731,7 @@
     ].
 
     (cmd == $r) ifTrue:[
-        dot receiver lowLevelErrorPrintCR.
+        dot receiver _errorPrintCR.
         ^ false
     ].
 
@@ -756,7 +756,7 @@
         ^ false
     ].
     (cmd == $e) ifTrue:[
-        (Parser evaluate:commandArg) lowLevelErrorPrintCR.
+        (Parser evaluate:commandArg) _errorPrintCR.
         ^ false
     ].
 
@@ -776,7 +776,7 @@
         (bool notNil) ifTrue:[
             Smalltalk ignoreHalt:bool not.
         ].
-        'halts are ' lowLevelErrorPrint. (Smalltalk ignoreHalt ifTrue:['disabled'] ifFalse:['enabled']) lowLevelErrorPrintCR.
+        'halts are ' _errorPrint. (Smalltalk ignoreHalt ifTrue:['disabled'] ifFalse:['enabled']) _errorPrintCR.
         ^ false
     ].
 
@@ -792,7 +792,7 @@
             proc terminate.
         ] ifFalse:[
             id notNil ifTrue:[
-                'no process with id: ' lowLevelErrorPrint. id lowLevelErrorPrintCR.
+                'no process with id: ' _errorPrint. id _errorPrintCR.
             ] ifFalse:[
                 Processor terminateActive
             ]
@@ -802,10 +802,10 @@
 
     (cmd == $W) ifTrue:[
         proc notNil ifTrue:[
-            'stopping process id: ' lowLevelErrorPrint. id lowLevelErrorPrintCR.
+            'stopping process id: ' _errorPrint. id _errorPrintCR.
             proc stop.
         ] ifFalse:[
-            'invalid process id: ' lowLevelErrorPrint. id lowLevelErrorPrintCR.
+            'invalid process id: ' _errorPrint. id _errorPrintCR.
         ].
         ^ false
     ].
@@ -813,10 +813,10 @@
     (cmd == $a) ifTrue:[
         "without id-arg, this is handled by caller"
         proc notNil ifTrue:[
-            'aborting process id: ' lowLevelErrorPrint. id lowLevelErrorPrintCR.
+            'aborting process id: ' _errorPrint. id _errorPrintCR.
             proc interruptWith:[AbortOperationRequest raise]
         ] ifFalse:[
-            'aborting' lowLevelErrorPrintCR.
+            'aborting' _errorPrintCR.
         ].
         ^ false
     ].
@@ -826,7 +826,7 @@
             proc terminateNoSignal.
         ] ifFalse:[
             id notNil ifTrue:[
-                'no process with id: ' lowLevelErrorPrint. id lowLevelErrorPrintCR.
+                'no process with id: ' _errorPrint. id _errorPrintCR.
             ] ifFalse:[
                 Processor terminateActiveNoSignal
             ]
@@ -903,7 +903,7 @@
             'MiniDebugger> '
           ] ifFalse:[
             'MiniDebugger' , nesting printString , '>'
-          ])) lowLevelErrorPrint.
+          ])) _errorPrint.
 
     UserInterrupt handle:[:ex |
         ex restart
@@ -912,7 +912,7 @@
 
         cmd := self getCharacter.
         cmd isNil ifTrue:[
-            '<EOF>' lowLevelErrorPrintCR.
+            '<EOF>' _errorPrintCR.
             "
              mhmh end-of-file;
              return a 'c' (for continue); hope that's ok.
@@ -930,7 +930,7 @@
             [cmd notNil and:[cmd == Character space]] whileTrue:[
                 cmd := self getCharacter
             ].
-            cmd isNil ifTrue:[ '<EOF>' lowLevelErrorPrintCR ].
+            cmd isNil ifTrue:[ '<EOF>' _errorPrintCR ].
         ].
 
         "
@@ -941,7 +941,7 @@
         [c isNil or:[c isEndOfLineCharacter]] whileFalse: [
             arg := arg copyWith:c.
             c := self getCharacter.
-            c isNil ifTrue:[ '<EOF>' lowLevelErrorPrintCR ].
+            c isNil ifTrue:[ '<EOF>' _errorPrintCR ].
         ].
         commandArg := (arg copyFrom:2) withoutSeparators.
         command := cmd.
@@ -956,21 +956,21 @@
     |args className sym val match showMethod|
 
     commandArg withoutSeparators isEmpty ifTrue:[
-        'usage: H className [methodPattern]' lowLevelErrorPrintCR.
+        'usage: H className [methodPattern]' _errorPrintCR.
         ^self
     ].
     args := commandArg asCollectionOfWords.
     className := args first.
 
     (sym := className asSymbolIfInterned) isNil ifTrue:[
-        'no such class' lowLevelErrorPrintCR.
+        'no such class' _errorPrintCR.
         ^ self.
     ].
-    val := Smalltalk at:sym ifAbsent:['no such class' lowLevelErrorPrintCR. ^ self.].
+    val := Smalltalk at:sym ifAbsent:['no such class' _errorPrintCR. ^ self.].
     val isBehavior ifFalse:[
-        'not a class: ' lowLevelErrorPrint. className lowLevelErrorPrintCR.
+        'not a class: ' _errorPrint. className _errorPrintCR.
         val := val class.
-        'showing help for ' lowLevelErrorPrint. val name lowLevelErrorPrintCR.
+        'showing help for ' _errorPrint. val name _errorPrintCR.
     ].
     args size > 1 ifTrue:[
         match := args at:2
@@ -986,11 +986,11 @@
             or:[ sel asLowercase startsWith:match asLowercase ]) ifTrue:[
                 mthd := cls compiledMethodAt:sel.
                 mthd category ~= 'documentation' ifTrue:[
-                    sel lowLevelErrorPrintCR.
+                    sel _errorPrintCR.
                     (mthd comment ? '') asStringCollection do:[:l |
-                        '    ' lowLevelErrorPrint. l withoutSeparators lowLevelErrorPrintCR.
+                        '    ' _errorPrint. l withoutSeparators _errorPrintCR.
                     ].
-                    '' lowLevelErrorPrintCR
+                    '' _errorPrintCR
                 ].
             ].
         ].
@@ -1045,13 +1045,13 @@
     Process allInstancesDo:[:p |
         (p isActive not
         and:[p isDead not]) ifTrue:[
-            '---------------------------------------------------------' lowLevelErrorPrintCR.
-            '  proc id=' lowLevelErrorPrint. p id asString lowLevelErrorPrint.
-            ' name=''' lowLevelErrorPrint. p name asString lowLevelErrorPrint.
-            ''' createdBy: ' lowLevelErrorPrint. p creatorId asString lowLevelErrorPrint.
-            ' state=' lowLevelErrorPrint.  p state asString lowLevelErrorPrint.
-            ' prio=' lowLevelErrorPrint. p priority asString lowLevelErrorPrintCR.
-            '' lowLevelErrorPrintCR. '' lowLevelErrorPrintCR.
+            '---------------------------------------------------------' _errorPrintCR.
+            '  proc id=' _errorPrint. p id asString _errorPrint.
+            ' name=''' _errorPrint. p name asString _errorPrint.
+            ''' createdBy: ' _errorPrint. p creatorId asString _errorPrint.
+            ' state=' _errorPrint.  p state asString _errorPrint.
+            ' prio=' _errorPrint. p priority asString _errorPrintCR.
+            '' _errorPrintCR. '' _errorPrintCR.
 
             self printBacktraceFrom:(p suspendedContext)
         ]
@@ -1066,9 +1066,9 @@
     |active|
 
     active := Processor activeProcess.
-    'current id=' lowLevelErrorPrint. 
-    active id printString lowLevelErrorPrint. 
-    ' name=''' lowLevelErrorPrint. active name lowLevelErrorPrint. '''' lowLevelErrorPrintCR.
+    'current id=' _errorPrint. 
+    active id printString _errorPrint. 
+    ' name=''' _errorPrint. active name _errorPrint. '''' _errorPrintCR.
 
     (Process allSubInstances sort:[:a :b | (a id ? -1)<(b id ? -1)]) do:[:p |
         |doShow|
@@ -1077,15 +1077,15 @@
         doShow := doShow or:[ (how == #dead) and:[ p isDead ]].
         doShow := doShow or:[ (how ~~ #dead) and:[ p isDead not ]].
         doShow ifTrue:[
-            'proc id=' lowLevelErrorPrint. (p id printStringPaddedTo:6) lowLevelErrorPrint.
-            (p state printStringPaddedTo:10) lowLevelErrorPrint.
-            ' pri=' lowLevelErrorPrint. (p priority printStringPaddedTo:2) lowLevelErrorPrint.
-            ' creator:' lowLevelErrorPrint. (p creatorId printStringPaddedTo:5) lowLevelErrorPrint.
-            ' group:' lowLevelErrorPrint. (p processGroupId printStringPaddedTo:5) lowLevelErrorPrint.
-            ' sys:' lowLevelErrorPrint. (p isSystemProcess ifTrue:'y' ifFalse:'n') lowLevelErrorPrint.
-            ' ui:' lowLevelErrorPrint. (p isGUIProcess ifTrue:'y' ifFalse:'n') lowLevelErrorPrint.
-            ' name=''' lowLevelErrorPrint. p name lowLevelErrorPrint.
-            '''' lowLevelErrorPrintCR.
+            'proc id=' _errorPrint. (p id printStringPaddedTo:6) _errorPrint.
+            (p state printStringPaddedTo:10) _errorPrint.
+            ' pri=' _errorPrint. (p priority printStringPaddedTo:2) _errorPrint.
+            ' creator:' _errorPrint. (p creatorId printStringPaddedTo:5) _errorPrint.
+            ' group:' _errorPrint. (p processGroupId printStringPaddedTo:5) _errorPrint.
+            ' sys:' _errorPrint. (p isSystemProcess ifTrue:'y' ifFalse:'n') _errorPrint.
+            ' ui:' _errorPrint. (p isGUIProcess ifTrue:'y' ifFalse:'n') _errorPrint.
+            ' name=''' _errorPrint. p name _errorPrint.
+            '''' _errorPrintCR.
         ]
     ]
 
@@ -1130,7 +1130,7 @@
    I ........ interpreter (expression evaluator)
    e expr ... evaluate expression & print result ("E" to not print)
    ? c [p] .. help on class c (selectors matching p)
-'  lowLevelErrorPrintCR.
+'  _errorPrintCR.
 
    (XWorkstation notNil and:[ Screen default isKindOf:XWorkstation ]) ifTrue:[
 '   To repair a broken X-Connection, enter an interpreter (enter "I") and evaluate:
@@ -1140,7 +1140,7 @@
       NewLauncher openOnDevice:Display.
       #exit
     then enter "c" to continue; a NewLauncher should pop up soon.
-'  lowLevelErrorPrintCR
+'  _errorPrintCR
     ]
 
     "Modified: / 03-02-2014 / 10:38:36 / cg"