DIRECTORY PrincOps USING [BytePC, FrameHandle, SVPointer]; FastBreak: DEFINITIONS = BEGIN FastBreakProc: TYPE = PROC [ data: FastBreakData, frame: PrincOps.FrameHandle, sv: PrincOps.SVPointer] RETURNS [useOldBreak: BOOL _ FALSE]; FastBreakData: TYPE = LONG POINTER; FastBreakId: TYPE = LONG POINTER TO INT; FastBreaksLeft: PUBLIC PROC RETURNS [NAT]; SetFastBreak: PROC [code: LONG POINTER, pc: PrincOps.BytePC, proc: FastBreakProc _ NIL, data: FastBreakData _ NIL] RETURNS [id: FastBreakId]; ClearFastBreak: PROC [id: FastBreakId, proc: FastBreakProc _ NIL, data: FastBreakData _ NIL] RETURNS [found: BOOL]; ClearAllFastBreaks: PROC [releaseResources: BOOL _ TRUE] RETURNS [cleared: NAT]; FastBreakHandler: PROC; SpecifyDefaultBreakHandler: PROC [old: PROC]; END. FastBreak.mesa Russ Atkinson, April 11, 1983 4:28 pm The FastBreak facility allows advanced clients to set breakpoints that must be processed quickly. The client may specify a routine to be called at the occurrence of a FastBreak. The FastBreak handler will take no page faults and perform no allocations, so if the user's routine takes no faults, breakpoints may be placed even on code that handles page faults. Data types The type of callback procedure supplied by the user. If useOldBreak, then we call the breakpoint handler in use at the time the first fast break was set. The type of data passed to/from the user's routines. Points at the event counter for the breakpoint. Client level operations FastBreaksLeft[] returns the number of fast break slots remaining in the table. SetFastBreak[code, pc, proc, data] adds a fast break at the specified location. The pointer returned is used to distinguish which break to clear when clearing the break. If NIL is returned, then the breakpoint could not be set (due to the table being full). The use of proc = NIL is for fast event counters. ClearFastBreak[id, proc, data] clears the specified fast break, provided that the parameters agree with an active fast break. TRUE is returned iff such a break was found. ClearAllFastBreaks[] clears all fast breaks. It also releases system resources used by fast breaks if releaseResources = TRUE. It returns the number of fast breaks removed. AMEvents level operations This is the breakpoint handler to be called for fast breaks. It must be externally installed as the breakpoint handler (presumably by AMEvents initialization). SpecifyDefaultBreakHandler[old] specifies the old breakpoint handler to be used when a non-fast break is encountered. It should be called before FastBreakHandler is installed. ʘJšœ™Jšœ%™%J˜Jšœé™éJ˜šÏk ˜ Jšœ œ"˜0—J˜šÏb œ ˜Jšœ˜—J˜Jšœ ™ ˜šÏn œœœ˜JšœI˜IJšœœœ˜$Jšœš™š—J˜šœœœœ˜#Jšœ4™4—J˜š œ œœœœœ˜(Jšœ/™/—J˜—Jšœ™˜š Ÿœœœœœ˜*JšœP™PJ˜—šŸ œ˜Jš œœœ-œœœ˜zJšœ¶™¶J˜—šŸœ˜Jšœ(œœ˜GJšœ œ˜Jšœ«™«J˜—šŸœ˜Jš œœœœ œ˜7Jšœ¯™¯J˜——Jšœ™˜šŸœœ˜Jšœ ™ J˜—šŸœœœ˜-Jšœ°™°J˜—Jšœ˜—J˜J˜—…— +