|
Class: MiniDebugger
Object
|
+--MiniDebugger
- Package:
- stx:libbasic
- Category:
- System-Debugging-Support
- Version:
- rev:
1.159
date: 2024/03/20 14:18:47
- user: alkurz
- file: MiniDebugger.st directory: libbasic
- module: stx stc-classLibrary: libbasic
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.
You can also enter it explicitly with:
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.
copyrightCOPYRIGHT (c) 1988 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
blocked debugger protocol
-
stopIgnoringHaltsFor: haltingMethod atLineNr: lineNrInHaltingMethod
-
ignore; in case someone opened a Launcher in a standalone app without debugger
defaults
-
eofCommand
-
EOF is treated like which command by default?
-
eofCommand: aCharacter
-
EOF is treated like which command
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.
on EOF, perform as if eofCommand was entered, which defaults to a(bort),
but can be configured (useful is: $x)
-
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
-
|