# CommandLineCirio.doc

# Copyright (c) 1990 by Xerox Corporation. All rights reserved.
# Philip James, September 10, 1990 5:07 pm PDT
# Laurie Horton, November 2, 1990 11:12:24 am PST


CommandLineCirio
For more reference on Cirio, see /PCedar2.0/Documentation/CirioDoc.tioga

Overview
The CommandLineCirio package is a way to use Cirio when you don't have viewers. This is to be a replacement for dbx.

Starting CommandLineCirio

When Cirio connects to a remote world, it expects a few files to have been loaded already. They are:
DebugNub.o
CirioThingsImpl
RegisterSaveRestore
you could add these lines to your BasicDotLoadeeCommand file
uload /home/AlphaOET/1.0n/xr/LIB/Threads-sparc/DebugNub.o
callall 𡤌irioNubStart
UnixLoad /pseudo/pcedar2.0/links/RegisterSaveRestore.sun4
RequireFrom PCedar2.0 CirioThings CirioThingsImpl

CommandLineCirio runs on top of the Cedar Commander to start CedarCommander do the following in a unix shell:
make sure that /project/pcedar2.0/bin is in your path.
% setenv XR←HOME /pseudo/xrhome
% setenv XR←VERSION 3𡤁.X
% CommanderWorld
Once in CedarCommander, type the following:
CedarCommander % pma /CLC -vux:/net/cat/rice/pjames
CedarCommander % from /CLC/CommandLineCirio source CirioStartup
There will be a lot of unbound imports, because a lot of Cirio code has viewers code in it, but that can be discussed later.

Commands And Use

CommanderLevel:
StartCommandLineCirio - Starts the CommandLineCirio package. This command will put you in Level Zero.

Level Zero: (In package)
QuitCommandLineCirio - Exits the CommandLineCirio package. This takes you to the Commander Level.
CirioConnectToWorld - Connects to a world. Usage is CirioConnectToWorld MachineName [PortNumber]

Level One: (connected to a world)
CirioDisconnectFromWorld - Eliminates current connection, use when done interacting with world connected to.
FlushUnknownFileCache - Flushes the unknown file cache, use when a file that wasn't around the first time checked for finally shows up.
KillRemoteWorld - Kill remote world execution, use when done with the world connected to.
StopRemoteWorld - Halts remote world execution, use to poke around in the remote world - This move you to Level Two.

Level Two: (world is stopped)
ResumeRemoteWorld - Resumes remote world execution, if a breakpoint was hit, don't forget to add and proceed the calling thread.
ResumeVP0 - Resumes remote world execution with one virtual processor.
AddDir - Adds a directory to the search directory list, for Cirio to look for when searching for .mob's, .c2c.c's, .c2c.o's, and .mesa's.
ListDir - Lists the search directory list.
SetBreak - Sets a break in the remote world. Usage is SetBreak FullPathOfSourceFile CharacterPositionInSourceFile
ListBreak - Lists all breaks.
ClearBreak - Clears the current break or all breaks. Usage is ClearBreak [All]
AddThreads - Adds threads to the working list, so that more can be done with them. This moves you to Level Three.

These were added for convenience:
SetCurrentThread - Sets the working thread. Usage is SetCurrentThread ThreadID
PrintCurrentThread - Prints the working thread.

Level Three: (threads have been added)
ListAvailableThreads - Lists the working thread list and the status of each thread.
Summary - Displays the stack of the given thread or the current thread. Usage is Summary [ThreadID]
Detailed - Focuses on the given thread or the current thread. This moves you to Level Four. Usage is Detailed [ThreadID]
Freeze - Freezes the given thread or the current thread. Usage is Freeze [ThreadID]
Proceed - Proceeds the given thread or the current thread. Usage is Proceed [ThreadID]
Abort - Aborts the given thread or the current thread. Usage is Abort [ThreadID]
Kill - Kills the given thread or the current thread. Usage is Kill [ThreadID]
DbxExamine - DbxExamines the given thread or the current thread. Usage is DbxExamine [ThreadID]


Level Four: (a thread has been focused on)
WalkStack - Walks through the stack of the world connected to. Usage is WalkStack [[Cooler|Warmer [NumberOfFrames]] | AbsoluteFrameNumber][C|Cedar]
ShowFrame - Show the current frame.
SourcePosition - Show the source postion for the current frame.
CirioDo - Enter Cirio interpreter. This can be used to look at and change variables. Exit or Quit will exit the interpreter.

Rebuilding
make a directory for the build.
% cd somewhere
% mkdir cirio
% cd cirio
bringover the necesary files.
% set path=(/project/pcedar2.0/bin $path)
% PCedarTools
PCedarTools% qbo /PCedar2.0/Top/Cirio-Suite.df
rebuild
PCedarTools% makedo4 Cirio
PCedarTools% makedo -df Cirio-Source.df -df Cirio-PCR.df -df Cirio-sun4o3.df
test to make sure the new package works
storeback
PCedarTools% smodel Cirio-Suite.df

Problems And Ideas
Local debugging doesn't abort...something to do with signals....