file: 15-C-debugger.t package: muf status: alpha
This function is invoked by break to do
the work of actually invoking the debugger.
Customization of ]doBreak is possible: break
actually runs whatever function it finds in the
@$s.doBreak property of the job. You may set this
property to anything you like. If it is not set to a valid
compiledFunction object, break becomes a
no-op.
Note that @$s.doBreak is set at login to the
value of me$s.doBreak, thus the way to
"permanently" change to another break function is to set
me$s.doBreak to the desired function.
The default ]doBreak function is currently
implemented as
: ]doBreak { [] -> @ }
( Save the event in a vector. )
( We do this before setting the )
( 'cont tag since we don't want )
( the 'cont tag trying to restore )
( the event to the stack when )
( invoked: )
]makeVector -> event
( Establish a 'cont tag that returns to caller: )
withTag cont do{
( Establish a 'continue restart jumping to 'cont: )
[ :function :: { -> ! } 'cont goto ;
:name 'continue
:reportFunction "Continue from 'break'."
| ]withRestartDo{
( Invoke debugger. We don't use )
( "]invokeDebugger" here because it )
( checks @$s.debugger_hook, and )
( CommonLisp specifies that 'break' )
( shouldn't use @$s.debugger_hook. )
@$s.debugger -> ]debugger
]debugger compiledFunction? if
event debugger call{ $ -> @ }
fi
( If no debugger, kill job: )
"break: Invalid @$s.debugger, killing job." ,
nil endJob
}
cont
]pop
}
;
']doBreak export
#']doBreak --> .u["root"]$s.doBreak
Go to the first, previous, next, last section, table of contents.