StackCirio.mesa
Copyright Ó 1990, 1991, 1992, 1993 by Xerox Corporation. All rights reserved.
Sturgis, March 26, 1990 10:16:07 am PST
Coolidge, July 18, 1990 10:15 am PDT
Last tweaked by Mike Spreitzer on July 23, 1992 2:06 pm PDT
Philip James, August 27, 1991 4:50 pm PDT
Udagawa, February 12, 1991 6:59 pm PST
Laurie Horton, September 18, 1991 5:57 pm PDT
Katsuyuki Komatsu January 22, 1993 12:39 pm PST
DIRECTORY
CirioBreakAccess USING[CirioBreakSet],
CirioNubAccess USING[Handle],
CirioTargets USING[Target],
CirioTypes USING[CompilerContext, Node],
IO USING[STREAM],
LoadStateAccess USING[LoadStateHandle],
NewAmpersandProcs USING[Handle],
NewRMTW USING[CedarModuleSet, RemoteMimosaTargetWorld],
OneCasabaParser USING[ParserTable],
PFSNames USING [PATH],
Rope USING[ROPE],
SourceFileOpsExtras USING [noPosition, Position, ShowProc],
SystemInterface USING[FileSet];
StackCirio: CEDAR DEFINITIONS =
BEGIN
CC: TYPE = CirioTypes.CompilerContext;
Types
Stack: TYPE = REF StackBody;
StackBody: TYPE;
Stacks
OpenStack: PROC[
ampersandContext1: CirioTypes.Node,
ampersandContext2: CirioTypes.Node,
cc: CC,
rmtw: NewRMTW.RemoteMimosaTargetWorld,
cedarModules: NewRMTW.CedarModuleSet,
nub: CirioNubAccess.Handle,
target: CirioTargets.Target,
fileSet: SystemInterface.FileSet,
breaks: CirioBreakAccess.CirioBreakSet,
lsh: LoadStateAccess.LoadStateHandle,
aph: NewAmpersandProcs.Handle,
cParserTable: OneCasabaParser.ParserTable,
hotFramePC: CARD,
hotFrameSP: CARD,
skipKFrames: CARD,
ShowSource: SourceFileOpsExtras.ShowProc,
reports: IO.STREAM] RETURNS[Stack];
OpenDummyStack: PROC[
ampersandContext1: CirioTypes.Node,
ampersandContext2: CirioTypes.Node,
cc: CC,
rmtw: NewRMTW.RemoteMimosaTargetWorld,
cedarModules: NewRMTW.CedarModuleSet,
nub: CirioNubAccess.Handle,
target: CirioTargets.Target,
fileSet: SystemInterface.FileSet,
breaks: CirioBreakAccess.CirioBreakSet,
lsh: LoadStateAccess.LoadStateHandle,
aph: NewAmpersandProcs.Handle,
cParserTable: OneCasabaParser.ParserTable,
ShowSource: SourceFileOpsExtras.ShowProc,
reports: IO.STREAM] RETURNS[Stack];
ShowQuickSummary: PROC[stack: Stack, stopFlag: REF BOOLEAN, on: IO.STREAM, long: BOOL];
QuickGenPossibleModuleNames: PROC[stack: Stack, for: PROC[name: PFSNames.PATH] RETURNS[--stop-- BOOLEAN], reports: IO.STREAM];
the generated names include the funny generated names. The client should ignore case. All text from the first dot to the end of the name has been removed. This is intended to be used when searching for a thread by "context". We also generate the containing dotO name.
NoteFileCacheFlush: PROC[stack: Stack];
Disassemble: PROC[stack: Stack, text: Rope.ROPE, reports: IO.STREAM, stop: REF BOOLNIL];
Stack examination
ResetStack: PROC[stack: Stack, reports: IO.STREAM] RETURNS[newFrameIndex: CARD];
Focuses on the hottest frame. This procedure should be called before any frame manipulation procedure.
WalkStack: PROC[stack: Stack, movement: INT, reports: IO.STREAM] RETURNS[actualMovement: INT, newFrameIndex: CARD];
Moves focus to a different frame. Positive movements are from hot frames to cold frames. Does not move beyond the hottest or coldest frame. Colder frames have higher frameIndices.
WalkStackCedarFrames: PROC[stack: Stack, nCedarFrames: INT, reports: IO.STREAM] RETURNS[actualNCedarFrames: INT, newFrameIndex: CARD];
Moves focus to a different frame. Positive movements are from hot frames to cold frames. Does not move beyond the hottest or coldest frame. Colder frames have higher frameIndices. Counts Cedar Frames rather than just any old frame.
WalkStackToCProcedure: PROC[stack: Stack, partialProcName: Rope.ROPE, moduleName: Rope.ROPE, reports: IO.STREAM] RETURNS[BOOLEAN];
moves focus to first frame whose associated procedure name begins with the characters in partialProcName. Returned Boolean is TRUE iff the search was successful.
GetBannerForDotOofCurrentFrame: PROC[stack: Stack, reports: IO.STREAM] RETURNS[Rope.ROPE];
Returns a terse text description of the DotO containing the embeddedDotO of the current frame.
GetCurrentFrameBanner: PROC[stack: Stack, reports: IO.STREAM] RETURNS[Rope.ROPE];
Returns a text description of the current frame.
ShowCurrentFrame: PROC[stack: Stack, reports: IO.STREAM] RETURNS[Rope.ROPE];
Shows the content of the current frame.
ShowSourcePosition: PROC[stack: Stack, reports: IO.STREAM, stop: REF BOOLNIL];
opens a viewer on mesa file containing the current pc in the current frame. Sets a feedback selection on the source position corresponding to the pc.
InterpretTextLine: PROC[stack: Stack, text: Rope.ROPE, reports: IO.STREAM] RETURNS[Rope.ROPE];
The text line will be interpreted in the context of the current frame.
SetDesiredLanguage: PROC [stack: Stack, lang: Language, reports: IO.STREAM];
Language: TYPE ~ {C, Cedar, Machine};
ReportDesiredLanguage: PROC [stack: Stack, reports: IO.STREAMNIL] RETURNS [Language];
Writes a message (\n terminated) on reports if given.
FormatPrompt: PROC [stack: Stack, counter: INT] RETURNS [Rope.ROPE];
ClearBreakPoint: PROC[stack: Stack, reports: IO.STREAM];
Clears the break (if any) at the absPC of the current frame in stack.
ClearIthBreakPoint: PROC [stack: Stack, i: INT, reports: IO.STREAM];
i is as reported in ListBreakPoints.
ClearAllBreakPoints: PROC[stack: Stack, reports: IO.STREAM];
ClearBreakPointAtPosition: PUBLIC PROC[stack: Stack, pos: SourceFileOpsExtras.Position, reports: IO.STREAM];
ClearBreakPointAtAddress: PUBLIC PROC[stack: Stack, addr: CARD, reports: IO.STREAM];
GetAbsPC: PROC[stack: Stack] RETURNS[CARD];
returns the absPC of the current frame in stack. This is used by the ClearBreakPoint procedure of RemoteCirioImpl.
FrameDiagnosticInfo: PROC[stack: Stack, reports: IO.STREAM];
prints diagnostic info about the current frame on reports
breakpoints are here for the moment, so that they need not be in both RemoteCirioImpl and LocalCirioImpl
ListBreakPoints: PROC[stack: Stack, reports: IO.STREAM];
SetBreakPointAtPosition: PUBLIC PROC[stack: Stack, pos: SourceFileOpsExtras.Position, reports: IO.STREAM, stopAll: BOOLEAN]
RETURNS [whereSet: SourceFileOpsExtras.Position ← SourceFileOpsExtras.noPosition];
SetBreakPointAtAddress: PUBLIC PROC[stack: Stack, addr: CARD, reports: IO.STREAM, stopAll: BOOLEAN];
END..