SymbolFinding.mesa
Sturgis, September 1, 1989 3:27:12 pm PDT
Last changed by Theimer on October 31, 1989 8:24:41 pm PST
Coolidge, July 11, 1990 11:19 am PDT
DIRECTORY
CirioNubAccess USING[FileEntry, Handle, PCInfo],
DotOAccess USING[DotOCookie, EmbeddedDotO],
MobAccess USING[MobCookie],
MobDotOAccess USING[JointMobDotOInfo],
PFSNames USING [PATH, Version],
Rope USING[ROPE],
RopeSequence USING [RopePart],
SystemInterface USING[FileSet];
SymbolFinding: CEDAR DEFINITIONS =
BEGIN
PATH: TYPE ~ PFSNames.PATH;
DotODesc: TYPE = REF DotODescBody;
DotODescBody: TYPE = RECORD[
fileInfo: CirioNubAccess.FileEntry,
frameInfo: CirioNubAccess.PCInfo];
FoundSymbols: TYPE = RECORD[
dotO: DotOAccess.DotOCookie,
embeddedDotO: DotOAccess.EmbeddedDotO,
mob: MobAccess.MobCookie,
jmdi: MobDotOAccess.JointMobDotOInfo];
SymbolInfo: TYPE = REF SymbolInfoBody;
SymbolInfoBody: TYPE;
CreateSymbolInfo: PROC[SystemInterface.FileSet] RETURNS[SymbolInfo];
search order will be last named path first
AddMobSearchPath: PROC[si: SymbolInfo, path: PFSNames.PATH];
this path will be checked before any of the previously recorded paths
(also invokes FlushSymbolFileCache)
FlushSymbolFileCache: PROC[si: SymbolInfo];
forgets the fact that it could not find some mobs. Thus, looks afresh for those mobs next time it is asked.
FindSymbols: PROC[serverName: Rope.ROPE, nub: CirioNubAccess.Handle, desc: DotODesc, absPC: CARD, si: SymbolInfo, searchDirectories: LIST OF PFSNames.PATH] RETURNS[FoundSymbols];
Possible results are:
can not find a dotO => [NIL, NIL, NIL]
found a dotO, but either there was no version stamp, or we could not find the corresponding mob => [dotO, NIL, NIL]
found a dotO and corresponding mob => [dotO, mob, jmdi]

If a mob and corresponding jmdi are returned, then the version stamp has been checked in memory.
A UnixFileName is:
volume name1 "/" remainingPath machineDependentSubdir stem secondaryExtension extension version
where
volume is either "/", "/volume/", or "/net/" or "/tmp←mnt/net/".
name1 contains no "/" and represents the pathname element that is relative to the volume, if there is one. (Thus name1 may be "".)
machineDependentSubdir is either "/" or "/target-machine-subdir/".
stem is the "root name" of the file and contains no "/".
secondaryExtension is either empty or something like ".c2c"; that is, it includes a ".".
extension is empty or something like ".o"; that is, it includes a ".".
version is empty or "~" someNumber "~" or "!" someNumber.
FactoredUnixFileName: TYPE = RECORD[
cirioPrefix: PATH, -- This rope is the Cirio-tool local equivalent of the volume,name1 part of a Unix file name (plus ending "/"). The concatenation [cirioPrefix cirioRemainingFileName] is the local equivalent of the original Unix file name and can be looked up from inside the Cirio tool.
cirioRemainingFileName: PATH, -- This rope is basically the concatenation of [remainingPath, ..., version].
volume: PATH,
name1: PATH,
remainingPath: PATH,
machineDependentSubdir: PATH,
stem: RopeSequence.RopePart,
secondaryExtension: RopeSequence.RopePart,
extension: RopeSequence.RopePart,
version: PFSNames.Version
];
FactorUnixFileName: PROC[unixFileName: PATH] RETURNS[FactoredUnixFileName];
Returns a disassembled version of the Unix file name fed in as argument.
Understands about the semantic meaning of the volume part of the name.
messages
ShowReport: SIGNAL[msgText: Rope.ROPE];
END..