Breakpoint.mesa
Copyright Ó 1989, 1990 by Xerox Corporation. All rights reserved.
Peter B. Kessler, April 18, 1990 11:41 am PDT
The client's interface to the breakpoint mechanisms.
DIRECTORY
TargetArchitecture,
Shepherd,
BreakWorldArchitecture,
Rope USING [ROPE];
Breakpoint: CEDAR DEFINITIONS ~ {
Machine-Dependent Procedures (exported by SPARCBreakpointImpl)
SetBreakpoint: SetBreakProc;
SetBreakProc: TYPE ~
PROCEDURE [
address: BreakWorldArchitecture.Address,
clientData: ClientData,
breakProc: BreakProc,
breakData: BreakData,
damages: TargetArchitecture.RegisterClass
← TargetArchitecture.RegisterClass.all]
RETURNS [Break];
ClientData: TYPE ~ REF ANY;
BreakProc: TYPE ~ BreakWorldArchitecture.Address;
BreakData: TYPE ~ CARD32;
BreakProcedure: TYPE ~ PROCEDURE [breakData: BreakData] RETURNS [];
Break: TYPE ~ REF BreakRep ← nullBreak;
nullBreak: Break ~ NIL;
BreakRep: TYPE;
ClearBreakpoint: ClearBreakProc;
ClearBreakProc: TYPE ~
PROCEDURE [break: Break] RETURNS [];
Machine-Independent Procedures (exported by BreakpointImpl)
Procedures you probably need:
EnumerateBreakpoints: EnumerateBreakProc;
EnumerateBreakProc: TYPE ~
PROCEDURE [breakWorld: BreakWorldArchitecture.BreakWorld, proc: BreakpointProc]
RETURNS [quit: BOOLEANFALSE];
BreakpointProc: TYPE ~
PROCEDURE [clientData: ClientData] RETURNS [quit: BOOLEAN];
Accessors for Breaks:
IsNullBreak: PROCEDURE [break: Break] RETURNS [BOOLEAN];
AddressFromBreak: PROCEDURE [break: Break] RETURNS [BreakWorldArchitecture.Address];
PatchFromBreak: PROCEDURE [break: Break] RETURNS [Shepherd.Patch];
ClientDataFromBreak: PROCEDURE [break: Break] RETURNS [ClientData];
Procedures you probably don't need (but I do):
NewBreakAccess: PROCEDURE [] RETURNS [BreakWorldArchitecture.BreakAccess];
BreakAccess: TYPE ~ REF BreakAccessRep ← nullBreakAccess;
nullBreakAccess: BreakAccess ~ NIL;
BreakAccessRep: TYPE ~ RECORD [
procs: BreakAccessProcs,
data: BreakAccessData
];
BreakAccessProcs: TYPE ~ REF BreakAccessProcsRep ← nullBreakAccessProcs;
nullBreakAccessProcs: BreakAccessProcs ~ NIL;
BreakAccessProcsRep: TYPE ~ RECORD [
set: SetBreakProc,
clear: ClearBreakProc,
enumerate: EnumerateBreakProc
];
BreakAccessData: TYPE ~ REF BreakAccessDataRep ← nullBreakAccessData;
nullBreakAccessData: BreakAccessData ~ NIL;
BreakAccessDataRep: TYPE;
RememberBreak: PROCEDURE [break: Break];
ForgetBreak: PROCEDURE [break: Break];
NewBreak: PROCEDURE [
address: BreakWorldArchitecture.Address,
patch: Shepherd.Patch,
clientData: ClientData]
RETURNS [Break];
Errors
ErrorCode: TYPE ~ ATOM ← nullErrorCode;
nullErrorCode: ErrorCode ~ NIL;
ErrorMessage: TYPE ~ Rope.ROPE ← nullErrorMessage;
nullErrorMessage: ErrorMessage ~ NIL;
CantSet: ERROR [code: ErrorCode, message: ErrorMessage];
Specifically for errors during setting.
CantClear: ERROR [code: ErrorCode, message: ErrorMessage];
Specifically for errors during clearing.
Cant: ERROR [code: ErrorCode, message: ErrorMessage];
For general errors.
}.