Avail Debugger Model
AvailDebuggerModel controls the execution of a set of fibers, allowing exploration of the fibers' state. A separate user interface should drive this model.
Author
Mark van Gulik
Constructors
Construct a new AvailDebuggerModel.
Properties
This gets set by gatherFibersThen to the List of all A_Fibers that have not yet been captured by other debuggers. The fibers likewise get a reference to this debugger, so they can determine how/whether to run during stepping operations.
The AvailRuntime in which the debugged fibers are running.
A publicly accessible list of functions to call when a new fiber is to be added to the list of tracked fibers.
A publicly accessible list of functions to call when a fiber has reached its pause condition.
Functions
For every existing fiber that isn't already captured by another debugger, bind that fiber to this debugger. Those fibers are not permitted to run unless this debugger says they may. Any fibers launched after this point (say, to compute a print representation or evaluate an expression) will not be captured by this debugger.
Determine whether the current capture function hook for the runtime is for this debugger.
The given fiber just reached the pause condition, and has transitioned to the PAUSED state. Enter a safe point and invoke each whenPausedActions.
Enter a safe point, then for each captured fiber, un-capture it, and unpause it if it was paused for the debugger. After all fibers have been released, invoke the callback, still within the safe point.
Allow the specified fiber to execute exactly one nybblecode. Supersede any existing run/step mode for this fiber. We must be in a safe point to change this mode.