|
Class: MiniDebugger
Object
|
+--MiniDebugger
- Package:
- stx:libbasic
- Category:
- System-Debugging-Support
- Version:
- rev:
1.136
date: 2019/03/12 21:36:41
- user: cg
- file: MiniDebugger.st directory: libbasic
- module: stx stc-classLibrary: libbasic
- Author:
- Claus Gittinger
a primitive (non graphical) debugger for use on systems without
graphics or when the real debugger dies
(i.e. an error occurs in the graphical debugger or the UI/event handler is broken).
This one is also called for, if an interrupt occurs within the debuger,
or if CTRL-C is pressed in the controlling tty/console.
Needs a console.
MiniDebugger enter
Attention:
all printing is done via lowLevel _errorPrint messages,
to ensure that output is to stderr, even if a logger is present,
or Stderr has been set to some other stream (Transcript).
Also to avoid the logger's interfering and adding imestamp information.
instance creation
-
enter
-
enter a miniDebugger
usage example(s):
-
enter: aContext withMessage: aString mayProceed: mayProceed
-
enter a miniDebugger
-
enter: aContext withMessage: aString mayProceed: mayProceed input: inputStreamOrNil
-
enter a miniDebugger
-
enterException: ex
-
enter a debugger; if this is a recursive invocation, enter
a MiniDebugger instead.
This is the standard way of entering the debugger;
sent from error- and halt messages.
-
enterWithMessage: aString mayProceed: mayProceed
-
enter a miniDebugger
-
new
-
redefined to make certain that there is only one miniDebugger
in the system
-
openOn: aProcess
-
enter a miniDebugger
-
singleStep: aBlock
-
-
trace: aBlock
-
-
trace: aBlock on: aStream
-
-
trace: aBlock with: aTraceBlock
-
accessing
-
inputStream: aStream
-
if non-nil, the debugger will read its input from there.
This allows for a miniDebugger to be used in a telnet stream (scripting)
entering
-
enter: aContext mayProceed: mayProceed
-
regular entry, via unhandled exception
-
stepInterrupt
-
entry via single stepinterrupt
usage example(s):
where is stepInterrupt context
|
initialization
-
initialize
-
private
-
findContext: aSelector
-
got it
-
garbageCollectCommand: id
-
-
getCharacter
-
globally blocking
-
getContext
-
remove Debugger commandLoop frame
-
moveDotDown
-
sigh - must search
-
moveDotUp
-
dot fullPrint.
-
printBacktraceFrom: aContext
-
-
printContext: aContext
-
print the receiver, selector and args of the context
-
printDot
-
' args: ' _errorPrint. (argNames ? #() asStringWith:$;) _errorPrintCR.
-
printDotsMethodSource
-
-
printDotsMethodSource: full
-
-
stepping
-
-
tracingWith: aBlockOrNil
-
user commands
-
commandLoop
-
read-eval commands, until one of the continue, abort or single step commands is entered;
return the last command character
-
doAbort
-
TEMPORARY kludge - find event handler context
this will be removed, once real debugging is possible
-
doCommand: cmd
-
a single command;
return true, if command loop should be finished
-
getCommand: prompt
-
Screen notNil ifTrue:[
-
helpOn: commandArg
-
-
interpreterLoopWith: anObject
-
|line done rslt|
-
printAllBacktraces
-
-
showProcesses
-
-
showProcesses: how
-
' sys:' _errorPrint. (p isSystemProcess ifTrue:'y' ifFalse:'n') _errorPrint.
-
showValidCommandHelp
-
|