|
|
Class: DebugView
Object
|
+--GraphicsContext
|
+--DeviceGraphicsContext
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--View
|
+--TopView
|
+--StandardSystemView
|
+--DebugView
- Package:
- stx:libtool
- Category:
- Interface-Debugger
- Version:
- rev:
1.498
date: 2010/04/27 17:04:56
- user: cg
- file: DebugView.st directory: libtool
- module: stx stc-classLibrary: libtool
- Author:
- Claus Gittinger
This class implements a graphical debugger interface.
The debugger usually sits on top of the faulting process,
taking over its event processing.
(this is different from other Smalltalk debuggers, which control
the debuggee as a separate process. Consider this an historic
leftover - the debugger was one of the first applications written for
ST/X; however, why should we change it without a particular need ...).
Only the 'stopped' debugged process is affected;
other processes continue to respond to events.
The one exception is when an error occurs within the dispatcher process
or in one of the eventhandler processes - in this case, the debugger
will sit on an exclusive display connection.
The whole debugging will be changed, once the required process primitives
are available, which allow control of another processes execution
(i.e. single-step, restart & return). The setup will be changed then,
to have the debugger control the debuggee (i.e. two processes)
See additional information in 'doc/misc/debugger.doc'.
Notice:
the DebugView class caches the last used debugger in a class
variable. It may happen, that a malfunctioning debugger (for example,
a halfway destroyed one) is kept there. You will notice this, if a
debugger comes up without showing any contents. In this case, close
(or destroy) the broken debugView, and execute
Debugger newDebugger
which removes the cached debugger and forces creation of a new one the
next time. This is a temporary workaround - the debugger will be fixed to
avoid this problem.
You also have to remove the cached debugger, if you change the debugger's
initialization code (buttons, menu, etc.) and you want the new code to become
effective.
Exception
Signal
Process
cleanup
-
lowSpaceCleanup
-
in low memory situations, give up cached debuggers
-
newDebugger
-
force creation of a new debugger (give up cached debuggers)
defaults
-
defaultIcon
-
return the browsers default window icon
-
defaultIconForAboutBox
-
-
defaultVerboseBacktrace
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
defaultVerboseBacktrace: aBoolean
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
updateStyleCache
-
extract values from the styleSheet and cache them in class variables
ignoring halts
-
haltIgnoreInformationFor: haltingMethod atLineNr: lineNrInHaltingMethod
-
the information (if any) about the ignore-state of a halt
-
hasIgnoredHalts
-
-
ignoreHaltIn: haltingMethod at: lineNrOfHalt forCount: countOrNil orTimeDuration: dTOrNil
-
remember to ignore a halt in some method for some number of invocations
or until some time has elapsed.
With nil count and time arguments, such an ignored halt is reactivated
-
isHaltToBeIgnoredIn: haltingMethod atLineNr: lineNrInHaltingMethod
-
-
isHaltToBeIgnoredIn: haltingMethod atLineNr: lineNrInHaltingMethod modifyEntryCount: modifyCount
-
should a halt be ignored ?
-
removeInactiveIgnores
-
-
stopIgnoringHalts
-
forget about all ignored halts
initialization
-
initialize
-
-
reinitialize
-
reinitialize after an image-restart
instance creation
-
enter
-
enter a debugger
-
enter: aContext withMessage: aString
-
enter a debugger
-
enter: aContext withMessage: aString mayProceed: mayProceed
-
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.
-
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.
-
enterUnconditional: aContext withMessage: aString mayProceed: mayProceed
-
enter a debugger - do not check for recursive invocation
-
enterWithMessage: message
-
enter a debugger
-
new
-
return a new DebugView.
- return a cached debugger if it already exists.
Also, care for remote displays on which no debugger is wanted
(ask with mayOpenDebugger) - if so, open on the default screen.
-
newExclusive
-
return a debugger for exclusive display access
-
openOn: aProcess
-
start a debugger on aProcess
(actually not more than a good-looking inspector)
menu specs
-
menuSpec
-
This resource specification was automatically generated
by the MenuEditor of ST/X.
misc
-
interestingContextFrom: aContext
-
return an interesting context to be shown in an error notifier.
We move up the calling chain, skipping intermediate Signal
and Exception contexts, to present the context in which the error
actually occured.
Just for your convenience :-)
-
interestingContextIndexIn: aContextArray
-
return an interesting contexts offset, or nil.
This is the context initially shown in the walkback.
We move up the calling chain, skipping all intermediate Signal
and Exception contexts, to present the context in which the error
actually occured.
Just for your convenience :-)
basic
-
enableDisableActions
-
-
enter: aContext select: initialSelectionOrNil
-
enter the debugger - get and display the context, then start an
exclusive event loop on top of eveything else
-
exit_abort
-
cannot simply raise an abort here, because if there is an abortHandler somewhere,
-
exit_abortAll
-
cannot simply raise an abort here, because if there is an abortHandler somewhere,
-
exit_quickTerminate
-
-
exit_restart
-
-
exit_return
-
-
exit_terminate
-
have to catch errors occuring in unwind-blocks
-
exit_unwindThenDo: aBlock
-
-
initialSelectionOnEntry: initialSelectionOrNil context: aContext
-
-
isInspecting
-
-
isNotInspecting
-
-
openOn: aProcess
-
enter the debugger on a process -
in this case, we are just inspecting the context chain of the process,
not running on top of the debugged process, but as a separate
one. (think of it as an inspector showing more detail, and offering
some more control operations)
-
setInitialSelectionOnEntry: initialSelectionOrNil context: aContext
-
-
turnOffAllButtons
-
help
-
flyByHelpDependsOnPositionIn: aView
-
subclasses where the help-text depends upon the pointer position might
want to redefine this
-
flyByHelpTextFor: aComponent
-
-
flyByHelpTextFor: aComponent at: aPointOrNil
-
-
helpTextFor: aComponent
-
initialization & release
-
addToCurrentProject
-
ignored here
-
destroy
-
closing the debugger implies an abort or continue
-
initialize
-
-
initializeAbortButtonIn: bpanel
-
-
initializeButtons1In: bpanel
-
creates the top button row, consisting of 'continue', 'abort', 'terminate'...
-
initializeButtons2In: bpanel
-
creates the second button row, consisting of 'next', 'step', 'return'...
-
initializeButtonsIn: bpanel
-
-
initializeCodeViewIn: panel
-
-
initializeContextListViewIn: panel
-
-
initializeContextViewsMiddleButtonMenu
-
-
initializeContinueButtonIn: bpanel
-
-
initializeDefineButtonIn: bpanel
-
-
initializeInspectorViewsIn: panel
-
-
initializeNextButtonIn: bpanel
-
-
initializeReportButtonIn: bpanel
-
-
initializeRestartButtonIn: bpanel
-
-
initializeReturnButtonIn: bpanel
-
-
initializeSendButtonIn: bpanel
-
-
initializeStepButtonIn: bpanel
-
-
initializeTerminateButtonIn: bpanel
-
-
postRealize
-
-
reinitialize
-
redefined - since the debugView runs on top of
-
setLabelFor: aMessage in: aProcess
-
interrupt handling
-
contextInterrupt
-
-
stepInterrupt
-
-
stepOrNext
-
menu & button actions
-
addBreakpoint
-
add a breakpoint on the selected contexts method - if any
-
addBrowserBookmark
-
add a browser-bookmark for the selected contexts method
-
allowBreakPointsInDebugger
-
-
allowBreakPointsInDebugger: aBoolean
-
-
autoRaiseView
-
-
autoRaiseView: aBoolean
-
-
autoUpdateOff
-
stop the update process
-
autoUpdateOn
-
fork a subprocess which updates the contextList in regular intervals
-
browseClass
-
browse the receiver's class (of the selected context's message)
-
browseClassHierarchy
-
browse the receiver's classHierarchy (of the selected context's message)
-
browseFullClassProtocol
-
browse the receiver's full protocol (of the selected context's message)
-
browseImplementingClass
-
browse the implementing class (of the selected context's message)
-
browseImplementors
-
open a browser on the implementors of the selected method's selector
-
browseImplementorsOf
-
open a browser on the implementors of some selector
-
browseProcessesApplication
-
browse the application class (of the process, if it is a GUI process)
-
browseReceiversClass
-
browse the receiver's class (of the selected context's message)
-
browseSenders
-
open a browser on the senders of the selected method's selector
-
browseSendersOf
-
open a browser on the senders of some selector
-
copyWalkbackText
-
place the contents of the walkback view into the copy-paste buffer.
This allows pasting it into some other view for printing ...
-
doAbort
-
abort - send Object>>abortSignal, which is usually caught
at save places (for example: in the event loop) and returns back
from whatever the process is doing, but does not terminate it.
-
doAbortAll
-
abortAll - send Object>>abortAllSignal, which is usually caught
at save places (for example: in the event loop) and returns back
from whatever the process is doing, but does not terminate it.
-
doContinue
-
continue from menu
-
doDefine
-
-
doIgnoreBreakpoints
-
-
doMicroSend
-
single send; reenter with next message send
-
doNext
-
skip for next source-code line; entering blocks
-
doNextOut
-
skip for next source-code line; leaving blocks
-
doNextOver
-
skip for next source-code line; skip over blocks
-
doNoTrace
-
-
doNotIgnoreBreakpoints
-
-
doOpenReportMailApp
-
open a mail report tool
-
doRestart
-
restart - the selected context will be restarted
-
doReturn
-
return - the selected context will do a ^nil
-
doSend
-
single send; reenter with next message send
-
doStep
-
skip for next send in selected method
-
doStep: lineNr
-
common helper for step, skip & next.
Arrange for single-steppping until we pass lineNr (if nonNil)
or to next line (if nil) or to next send (if -1)
-
doStop
-
stop the process (if its running, otherwise this is a no-op)
-
doTerminate
-
terminate - the process has a chance for cleanup
-
doTrace
-
tracing - not really implemented ...
-
doTraceStep
-
tracestep - not implemented yet
-
exit
-
exit from menu: immediate exit from smalltalk
-
hasHaltsToIgnore
-
-
ignoreHaltForever
-
-
inspectContext
-
launch an inspector on the currently selected context
-
isStoppedAtHaltOrBreakPoint
-
-
middleButtonMenu
-
-
openAboutThisApplication
-
opens an about box for this application.
-
openIgnoreHaltNTimesDialog
-
-
openIgnoreHaltUntilTimeElapsedDialog
-
-
openSettingsDialog
-
-
quickTerminate
-
quick terminate - the process will get no chance for cleanup actions
-
removeAllBreakpoints
-
remove all trace & breakpoints - if any
-
removeBreakpoint
-
remove breakpoint on the selected contexts method - if any
-
showDenseWalkback
-
-
showMore
-
double the number of contexts shown
-
showVerboseWalkback
-
-
showingDenseWalkback
-
-
showingVerboseWalkback
-
-
skip
-
skip for cursor line in selected method
-
skipForReturn
-
skip until the selected context is left.
-
skipUntilEntering
-
skip until some particular method is invoked.
-
stopIgnoringHalts
-
-
toggleVerboseWalkback
-
private
-
abortAllIsHandled
-
-
addIgnoredHaltForCount: countOrNil orTimeDuration: dTOrNil
-
-
busy
-
-
canAddBreakpoint
-
-
canBrowseClassHierarchy
-
-
canBrowseFullClassProtocol
-
-
canBrowseImplementingClass
-
-
canBrowseProcessesApplication
-
-
canBrowseReceiversClass
-
-
canDefineMethod
-
-
canRemoveBreakpoint
-
-
canRestart
-
-
canReturn
-
-
canShowMore
-
-
contextListEntryFor: aContext
-
-
exclusive: aBoolean
-
-
explainSelection
-
-
findHaltingContext
-
-
findNodeForInterval: interval
-
-
findNodeIn: tree forInterval: interval
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
goodSkipUntilSelector
-
-
haltSelectors
-
-
hasContextSelected
-
-
ignoreBreakpoints
-
-
inspectedProcess
-
-
interruptProcessWith: aBlock
-
let inspected process do something, then update the context list
-
mayProceed: aBoolean
-
-
openHTMLDocument: anHTMLFilename
-
open a HTMLDocumentView on anHTMLFilename
-
processPerform: aMessage
-
do something, then update the context list
-
redisplayBacktrace
-
force redisplay of the walkBack list; invoked when the
verbose-flag setting is changed
-
selectedInterval
-
-
showError: message
-
-
showTerminated
-
-
showValue: aValue
-
TODO: show value in info field
-
stepping
-
-
unstep
-
-
updateContext
-
-
withNodeValueAtInterval: interval do: aBlock
-
private queries
-
isAborting
-
-
isHaltToBeIgnored
-
-
setOfHiddenCallingSelectors
-
-
setOfHiddenCallingSelectors: aCollectionOfSymbols
-
private-cache handling
-
cacheMyself
-
remember myself for next debug session
-
isCached
-
tell wether we are a cached debugger
-
releaseDebuggee
-
We have to be careful to release all refs to the debuggee,
because we may be in the cache.
Otherwise, the GC will not be able to release it
-
uncacheMyself
-
do not remember myself any longer for next debug session
private-context handling
-
setContext: aContext
-
show calling chain from aContext in the walk-back listview
-
setContext: aContext releaseInspectors: releaseInspectors
-
show calling chain from aContext in the walk-back listview.
Most complications here arise from filtering less-interesting contexts
if not in verbose-context mode.
-
setContextSkippingInterruptContexts: aContext
-
show calling chain from aContext in the walk-back listview.
Ignore any non-interesting interrupt-context.
-
showingContext1: aContext calling: calledContext
-
return false, if this (top) context is to be skipped.
Here, we hide some well known methods, which are usually not too interesting;
the set of methods which are suppressed is my (claus's) own choice.
-
showingContext2: aContext nesting: nesting
-
return false, if this (intermediate) context is to be skipped.
Here, we hide some well known methods, which are usually
not too interesting;
the set of methods which are suppressed is my (claus's) own choice.
private-control loop
-
controlLoop
-
this is a kludge:
start a dispatchloop which exits when
either continue, return or step is pressed
-
controlLoopCatchingErrors
-
this is the debuggers own private event handling loop;
errors are caught, to prevent recursive debugger-invocations.
user interaction
-
checkIfCodeIsReallyModified
-
-
checkSelectionChangeAllowed
-
-
checkSelectionChangeAllowed: newSelection
-
-
codeAccept: someCode
-
user wants some code to be recompiled - must unwind stack since everything above
and including selected method cannot be continued.
-
codeAccept: someCode inClass: aClass unwind: doUnwind category: category onCancel: cancelAction
-
user wants some code to be recompiled - must unwind stack since everything above
and including selected method cannot be continued.
-
codeAccept: someCode unwind: doUnwind category: givenCategoryOrNil onCancel: cancelAction
-
user wants some code to be recompiled - must unwind stack since everything above
and including selected method cannot be continued.
-
codeCompletion
-
-
confirm: aString
-
open a modal yes-no dialog.
Redefined here, to answer true, if exclusice Debugger, which cannot handle popup boxes
-
doShowSelection: lineNr
-
user clicked on a header line - show selected code in textView.
Also sent to autoselect an interesting context on entry.
-
hideStackInspector
-
-
processEvent: anEvent
-
filter keyboard events for popUp variable value display.
Return true, if I have eaten the event
-
setCurrentMethod: aMethodOrNil
-
-
showSelection: lineNr
-
user clicked on a header line - show selected code in textView.
Also sent to autoselect an interesting context on entry.
-
showStackInspectorFor: con
-
-
updateForContext: lineNr
-
show selected code for lineNr in contextList in textView.
Also used to autoselect an interesting context on entry.
-
updateMenuItems
-
IgnoredHalt
|