-- BBBreak.mesa -- Russ Atkinson, September 9, 1982 7:26 pm DIRECTORY BBObjectLocation USING [BreakpointId, Location], Rope USING [ROPE], RTBasic USING [TV]; BBBreak: CEDAR DEFINITIONS = BEGIN OPEN Rope, RTBasic; -- when an action has kind = break, the data is of type BreakId BreakList: TYPE = LIST OF BreakId; BreakId: TYPE = REF BreakIdRep; BreakIdRep: TYPE = RECORD [index: BreakIndex, loc: BBObjectLocation.Location, cid: BBObjectLocation.BreakpointId, condProc: CondProc _ NIL, -- invoked before each break condData: REF _ NIL, entry, exit, enabled: BOOL]; CondProc: TYPE = PROC [bid: BreakId, lf: TV, data: REF _ NIL] RETURNS [break: BOOL]; -- this type is useful for conditional breakpoints -- one returns TRUE to break, FALSE to continue BreakIndex: TYPE = INT; NullIndex: BreakIndex = 0; BreakError: ERROR [reason: ROPE]; BreakEntry: PROC [proc: TV] RETURNS [BreakIndex]; -- add break at entry to the given procedure BreakExit: PROC [proc: TV] RETURNS [BreakIndex]; -- add break at exit from the given procedure ClearBreak: PROC [index: BreakIndex] RETURNS [BreakId]; -- clear the given break (if any) -- returning the break id for that index (if any) ClearAllBreaks: PROC [condProc: CondProc _ NIL]; -- clear all breaks with the given cond proc -- defaults to clearing unconditional breaks FindBreakId: PROC [index: BreakIndex] RETURNS [BreakId]; -- translate from break index to break id AddBreakToList: PROC [loc: BBObjectLocation.Location, condProc: CondProc _ NIL, condData: REF _ NIL] RETURNS [BreakId]; -- make a new breakpoint at the given location -- then add it to the list RemBreakFromList: PROC [index: BreakIndex] RETURNS [BreakId]; -- remove the break from the list -- but do not clear the breakpoint -- warning: you may not like the results! NextBreak: PROC [index: BreakIndex _ NullIndex] RETURNS [BreakIndex]; -- if index = NullIndex, return first break in list -- otherwise, return first break index after given break -- returns NullIndex if no such break END. Κ„– "Mesa" style˜Iprocš¦Οc<œΟk œžœ"žœžœžœžœ žœž œžœžœ@œ žœžœžœžœžœžœžœŒžœœžœžœžœ Οnœžœžœžœžœžœžœ žœ3œ0œžœžœ1žœ žœ Ÿ œžœžœžœ-œŸ œžœžœžœ.œŸ œžœžœ"œ3œŸœžœžœ-œ.œŸ œžœžœ+œŸœžœ>žœ žœžœ žœ/œœŸœžœžœ"œ#œ*œŸ œžœ!žœ4œ9œ&œžœ˜†—…—ˆ