<> <> <> <> <> DIRECTORY AMModel USING [Section], IO USING [STREAM], PrincOps USING [PsbNull, PsbIndex], Rope USING [ROPE]; SpyClient: DEFINITIONS = BEGIN OPEN Rope; StackType: TYPE = CARDINAL [0..7); DataType: TYPE = {CPU, process, breakProcess, pagefaults, allocations, wordsAllocated, userDefined}; <> InitializeSpy: PROC [dataType: DataType _ CPU, process: PrincOps.PsbIndex _ PrincOps.PsbNull, spyOnSpyLog: BOOL _ FALSE] RETURNS [errorMsg: ROPE]; <> <> <> <<>> StandardSpy: PROC = INLINE {IF InitializeSpy[].errorMsg # NIL THEN ERROR}; StartSpy: PROC; <> StopSpy: PROC; <> DisplayData: PROC [cutoff: CARDINAL _ 3, herald: ROPE _ NIL, stream: IO.STREAM _ NIL, spyOnSpyLog: BOOL _ FALSE]; <<... displays data (automatically stops Spy); cutoff gives cutoff of printing (in percentage points); herald is the client supplied herald (follows Cedar Spy of xxx); a typescript is opened if stream = NIL>> <> SetStartBreak: PROC [section: AMModel.Section _ NIL, procedure: ROPE _ NIL, sourceIndex: INT _ 0] RETURNS [ok: BOOL, msg: ROPE]; <<... sets a breakpoint that will start Spying whenever the breakpoint is encountered. procedure is of form "ModuleIMPL.Proc" & is only used if section = NIL; if sourceIndex # 0, then treat `procedure' as a filename.>> SetStopBreak: PROC [section: AMModel.Section _ NIL, procedure: ROPE _ NIL, sourceIndex: INT _ 0] RETURNS [ok: BOOL, msg: ROPE]; <<... sets a breakpoint that will stop Spying whenever the breakpoint is encountered. procedure is of form "ModuleIMPL.Proc" & is only used if section = NIL (breakpoint is set at the RETURN); if sourceIndex # 0, then treat `procedure' as a filename.>> ClearBreaks: PROC; <> SetUserBreak: PROC [section: AMModel.Section _ NIL, type: StackType _ 0, procedure: ROPE _ NIL, sourceIndex: INT _ 0] RETURNS [ok: BOOL, msg: ROPE]; <> SetTrace: PROC [section: AMModel.Section _ NIL, procedure: ROPE _ NIL, sourceIndex: INT _ 0] RETURNS [ok: BOOL, msg: ROPE]; <> <<>> ClearUserBreaks: PROC; <> END. .