Inter-Office Memorandum
To CedarUsers^  Date December 12, 1983
From Russ Atkinson  Location PARC
Subject BreakTool and Celtics Organization CSL
Filed as: [Indigo]<Cedar>Documentation>CelticsDoc.tioga
BreakTool and Celtics documentation
BreakTool
BreakTool is a package that supports various fancy breakpoint facilities. These include breakpoints that occur only if some condition is true, breakpoints that evaluate expressions at each occurence, and breakpoints that log results at every occurence. All of these capabilities are provided by special expressions that can be evaluated at each breakpoint. A list of these expressions follows:
&abort[...] - raises ERROR ABORTED. Ignores any arguments.
&break[...] - evaluates its arguments, then causes a pseudo-breakpoint to occur at the point where the break was set.
&do[...] - evaluates its arguments repeatedly until the iteration is terminated (i.e. by &result[]).
&empty[] - evaluates its arguments, then returns the same non-printing result as would result from a procedure invocation with no returns.
&evq[...] - evaluates its arguments, then returns a TV for the last of its arguments.
&msg[...] - prints the results of evaluating its arguments. However, for any arguments that result in ROPEs, the printing is performed without quotes.
&print[...] - prints the results of evaluating its arguments. For any arguments that result in ROPEs, the printing is performed with quotes.
&prog[...] - evaluates its arguments, then returns the results of the last evaluation.
&result[...] - evaluates its arguments, then forces the termination of the nearest enclosing evaluation of one of the above special expressions. &result[] is the recommended way to terminate the evaluation of &do[].
To set a breakpoint that evaluates an expession at each occurence of the breakpoint, perform the following steps:
1. enter the expression into the Expr: window in the BreakTool
2. using the mouse, select the point where you want the breakpoint placed
3. click the Set button in the BreakTool
The BreakTool has the following buttons:
Set sets an evaluation breakpoint using the current Expr and selection
Clear clears the selected breakpoint
Clear * clears all breakpoints set by the BreakTool
List * lists all breakpoints set by the BreakTool
Eval evaluates the current Expr and prints the results
EvalSel evaluates the current selection as an expression and prints the results
Celtics
Celtics is a package that can be used to count how many times control passes through given points in the system. Although much more limited than either the Break Tool or the Spy, it is also more interactive and perturbs the system less. Counting breakpoints can be set on high-priority processes or even in code as sensitive as SafeStorage allocation.
Celtics has the following buttons:
Set  sets an couting breakpoint using the selection
Clear *  clears all breakpoints set by Celtics
Reset *  clears the counts of all breakpoints set by Celtics
AddSubTotal adds a subTotal node to the display
Each line in the display represents a separate breakpoint. Each line has two buttons, clear and reset, which are used to clear the associated breakpoint or to simply reset its count to 0. These buttons are followed by the count, which is updated every second. Following the count is the location of the breakpoint, consisting of:
code the address of the code for the breakpoint. Useful for distiguishing between different instances of modules.
pc the program counter for the breakpoint.
pos the source position for the breakpoint.
name the procedure name for the breakpoint.