RemoteCirio.mesa
Copyright Ó 1992 by Xerox Corporation. All rights reserved.
Sturgis, March 14, 1990 4:19 pm PST
Last changed by Theimer on October 31, 1989 8:15:24 pm PST
Last tweaked by Mike Spreitzer on December 11, 1990 4:13 pm PST
Philip James, February 3, 1992 10:33 am PST
Udagawa, January 13, 1991 5:39 pm PST
Laurie Horton, November 25, 1991 3:16 pm PST
DIRECTORY
IO USING[STREAM],
Rope USING[ROPE],
StackCirio USING[Stack];
RemoteCirio: CEDAR DEFINITIONS =
BEGIN
Types
Connection: TYPE = REF ConnectionBody;
ConnectionBody: TYPE;
Connections
OpenConnection: PROC[remoteName: Rope.ROPE, portNum: CARD, workingDirectories: LIST OF Rope.ROPE, reports: IO.STREAM] RETURNS[Connection];
Working directory is where we shall look for Mob files if we don't find them elsewhere. Normally, this is the working directory on the D-machine in which the debugger tool was called.
FlushUnknownFileCache: PROC[connection: Connection, reports: IO.STREAM];
A record is kept of unknown files, so that later attempts to find them fail fast. That list of unknown files is erased by this procedure.
CloseConnection: PROC[connection: Connection, reports: IO.STREAM];
The tool should endevour to make sure the connection is ultimately closed. Only one connection can be open at a time to a <remoteName, portNum> pair.
DestroyRemoteWorld: PROC[connection: Connection];
This blows away the remote pcr world and closes the connection.
Threads
StopRemoteWorld: PROC[connection: Connection, reports: IO.STREAM] RETURNS[nThreads: CARD];
permits examination of threads
following procedures require that the world be stopped
ThreadProperty: TYPE = RECORD[
SELECT case: * FROM
any => [],
callingDebugger => [],
ready => [],
context => [name: Rope.ROPE],
ENDCASE];
FindThreadsWithProperty: PROC[connection: Connection, property: ThreadProperty, reports: IO.STREAM] RETURNS[LIST OF -- threadIndex -- CARD];
Examines the threads to see if any satisfy the given property. Returns a list of indices of threads that satisfy the given property. NOTE WELL: the thread indices are indices into a table in connection, they are NOT the remote thread index. (The remote thread index will appear in the ThreadTitleText and is returned by FocusOnThread )
GetThreadTitleText: PROC[connection: Connection, threadIndex: CARD] RETURNS[Rope.ROPE];
ThreadIndexFromID: PROC[ID: CARD, connection: Connection] RETURNS [index: CARD ¬ LAST[CARD]];
ThreadIDFromIndex: PROC[index: CARD, connection: Connection] RETURNS [ID: CARD ¬ LAST[CARD]];
ShowQuickSummary: PROC[connection: Connection, threadIndex: CARD, stopFlag: REF BOOLEAN, on: IO.STREAM, long: BOOL];
GetThreadDebuggingBanner: PROC[connection: Connection, threadIndex: CARD, reports: IO.STREAM] RETURNS[Rope.ROPE];
AbortThread: PROC[connection: Connection, threadIndex: CARD, reports: IO.STREAM] RETURNS[newThreadTitleText: Rope.ROPE];
KillThread: PROC[connection: Connection, threadIndex: CARD, reports: IO.STREAM] RETURNS[newThreadTitleText: Rope.ROPE];
FreezeThread: PROC[connection: Connection, threadIndex: CARD, reports: IO.STREAM] RETURNS[newThreadTitleText: Rope.ROPE];
ProceedThread: PROC[connection: Connection, threadIndex: CARD, reports: IO.STREAM] RETURNS[newThreadTitleText: Rope.ROPE];
DbxExamineThread: PROC[connection: Connection, threadIndex: CARD, reports: IO.STREAM] RETURNS[nThreads: CARD];
arranges for remote world to call DBX on the thread. Does not return to client until remote world dbx lets go. Because the remote world has been running, the thread structure may be altered. The client must reconstruct that structure
ResumeRemoteWorldWithOnlyVP0: PROC[connection: Connection];
allows remote world to continue execution, however, only virtual processor 0 will be active. (The threads that called the debugger will not execute.) Connection remains valid. Client must restop the world before any subsequent examination of threads.
ResumeRemoteWorld: PROC[connection: Connection];
allows remote world to continue execution. (The threads that called the debugger will not execute.) Connection remains valid. Client must restop the world before any subsequent examination of threads.
Stack examination
Each thread has an internal frame pointer that selects one frame in the thread. All of these procedures require that the world be stopped.
GetDummyStack: PROC[connection: Connection, reports: IO.STREAM]RETURNS[StackCirio.Stack];
Returns a "dummy" stack. This may be used for the interpretation of some text lines.
FocusOnThread: PROC[connection: Connection, threadIndex: CARD, reports: IO.STREAM]RETURNS[newRemoteThreadIndex: CARD];
Resets the thread index for detailed examination. We refer to this thread as the "currentThread" in the following procedures.
GetStackForCurrentThread: PROC[connection: Connection, reports: IO.STREAM]RETURNS[StackCirio.Stack];
Returns a stack for the current thread. Subsequent examination may procede using StackCirio.
misc
AddSearchDirectory: PROC [connection: Connection, directoryPath: Rope.ROPE, reports: IO.STREAM];
RemoveSearchDirectory: PROC [connection: Connection, directoryPath: Rope.ROPE, reports: IO.STREAM];
ListSearchDirectory: PROC [connection: Connection, reports: IO.STREAM];
ClearSearchDirectory: PROC [connection: Connection, reports: IO.STREAM];
added for debugging
InstallBreakCheckDaemon: PROC [connection: Connection, reports: IO.STREAM];
StopBreakCheckDaemon: PROC [connection: Connection, reports: IO.STREAM];
END..