eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'MiniDebugger':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: MiniDebugger


Inheritance:

   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

Description:


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.
    

copyright

COPYRIGHT (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.

Class protocol:

blocked debugger protocol
o  stopIgnoringHaltsFor: haltingMethod atLineNr: lineNrInHaltingMethod
ignore; in case someone opened a Launcher in a standalone app without debugger

defaults
o  eofCommand
EOF is treated like which command by default?

o  eofCommand: aCharacter
EOF is treated like which command

instance creation
o  enter
enter a miniDebugger

Usage example(s):

     MiniDebugger enter

o  enter: aContext withMessage: aString mayProceed: mayProceed
enter a miniDebugger

o  enter: aContext withMessage: aString mayProceed: mayProceed input: inputStreamOrNil
enter a miniDebugger

o  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.

o  enterWithMessage: aString mayProceed: mayProceed
enter a miniDebugger

o  new
redefined to make certain that there is only one miniDebugger
in the system

o  openOn: aProcess
enter a miniDebugger

o  singleStep: aBlock

o  trace: aBlock

o  trace: aBlock on: aStream

o  trace: aBlock with: aTraceBlock


Instance protocol:

accessing
o  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
o  enter: aContext mayProceed: mayProceed
regular entry, via unhandled exception

o  stepInterrupt
entry via single stepinterrupt

Usage example(s):

where is stepInterrupt context

initialization
o  initialize

private
o  findContext: aSelector
got it

o  garbageCollectCommand: id

o  getCharacter
globally blocking

o  getContext
remove Debugger commandLoop frame

o  moveDotDown
sigh - must search

o  moveDotUp
dot fullPrint.

o  printBacktraceFrom: aContext

o  printContext: aContext
print the receiver, selector and args of the context

o  printDot
' args: ' _errorPrint. (argNames ? #() asStringWith:$;) _errorPrintCR.

o  printDotsMethodSource

o  printDotsMethodSource: full

o  stepping

o  tracingWith: aBlockOrNil

user commands
o  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)

o  doAbort
TEMPORARY kludge - find event handler context
this will be removed, once real debugging is possible

o  doCommand: cmd
a single command;
return true, if command loop should be finished

o  getCommand: prompt
Screen notNil ifTrue:[

o  helpOn: commandArg

o  interpreterLoopWith: anObject
|line done rslt|

o  printAllBacktraces

o  showProcesses

o  showProcesses: how
' sys:' _errorPrint. (p isSystemProcess ifTrue:'y' ifFalse:'n') _errorPrint.

o  showValidCommandHelp



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sun, 22 Dec 2024 01:07:25 GMT