DIRECTORY IO USING [STREAM], Rope USING [ROPE], TeleLoad USING [AddressSpace, CoreAddress, CoreBlock, State8086Object]; LarkPrograms: CEDAR DEFINITIONS = { IDType: TYPE = {procedure, variable}; STObject: TYPE = RECORD [ id: Rope.ROPE _ NIL, addr: INT _ 0, type: IDType _ variable ]; nullItem: STObject; STItem: TYPE = REF STObject; SymbolTable: TYPE = REF SymTabObject; SymTabObject: TYPE = RECORD [ e: SEQUENCE length: NAT OF STObject ]; PatchItem: TYPE = REF PatchItemObject; PatchItemObject: TYPE = RECORD [ name: Rope.ROPE, address: TeleLoad.CoreAddress, wordValue: CARDINAL ]; Program: TYPE = REF ProgramObject; ProgramObject: TYPE = RECORD [ program: LIST OF TeleLoad.CoreBlock _ NIL, patchList: LIST OF PatchItem _ NIL, programName: Rope.ROPE _ NIL, addressSpace: TeleLoad.AddressSpace _ main, startState: TeleLoad.State8086Object, searchTable: REF SymTabObject _ NIL, nameTable: REF SymTabObject _ NIL ]; EnumeratePrograms: PROC [proc: PROC [program: Program] RETURNS [stop: BOOL]]; FetchProgram: PROC [programName: Rope.ROPE] RETURNS [p: Program]; AddOrReplaceProgram: PROC [program: Program]; ResetPatchList: PROC [program: Program]; ReadProgramFromDisk: PROC [objectFileName: Rope.ROPE, log: IO.STREAM _ NIL, addressSpace: TeleLoad.AddressSpace _ main, wDir: Rope.ROPE] RETURNS [Program]; ReadProgramFromMBFile: PROC [mbFileName: Rope.ROPE, baseAddress: TeleLoad.CoreAddress, log: IO.STREAM _ NIL, addressSpace: TeleLoad.AddressSpace _ main, wDir: Rope.ROPE] RETURNS [Program]; BuildSearchTable: PROC [program: Program, name: Rope.ROPE, log: IO.STREAM _ NIL, wDir: Rope.ROPE]; PatchProgramWord: PROC [program: Program, address: TeleLoad.CoreAddress, wordValue: CARDINAL, name: Rope.ROPE _ NIL]; PatchFromFile: PROC [program: Program, fileName: Rope.ROPE, log: IO.STREAM _ NIL, wDir: Rope.ROPE] RETURNS [LIST OF PatchItem]; ProcedureEnclosing: PROC [program: Program, addr: TeleLoad.CoreAddress, searchMonitor: BOOL _ TRUE, wDir: Rope.ROPE] RETURNS [s: STObject]; FindVariable: PROC [program: Program, name: Rope.ROPE, searchMonitor: BOOL _ TRUE, wDir: Rope.ROPE] RETURNS [item: STObject, found: BOOL]; Monitor: PROC [log: IO.STREAM _ NIL, addressSpace: TeleLoad.AddressSpace _ main, wDir: Rope.ROPE] RETURNS [mon: Program]; }. April 25, 1983 11:08 am, LCS, created from TeleDebOps August 10, 1983 12:07 pm, LCS, added ReadProgramFromMBFile April 6, 1987 9:33:05 am PDT, LCS, added addressSpace arg to Monitor, August ~LarkPrograms.mesa Copyright Σ 1987 by Xerox Corporation. All rights reserved. Last Edited by: Stewart, August 30, 1983 3:11 pm Swinehart, April 6, 1987 9:39:32 am PDT Here is the symbol table part global variable with null stuff in it. Dealing with programs for Lark Enumerate all programs on tap. Search for the given program on the list of parsed programs Put the given program on the list of parsed programs, replacing a previous copy Reset the patch list associated with the program. program.patchList _ NIL Reads the program, but does not store it in the data base (use AddOrReplaceProgram) Read symbol tables for the program. Used internally by Monitor and ReadProgramFromDisk, probably not needed externally. Add a patch item to the list for the given program. Read patch items from the given file, checking symbol names against the symbol table for the given program. Symbol table access. ProcedureEnclosing is handy for printing stack traces. It finds the symbol with the next lowest address. (Note: works fine for finding the static symbol most nearby.) If searchMonitor = TRUE, then the search will include monitor symbols, if any can be found. Usual kind of symbol table lookup. If searchMonitor = TRUE, then the search will include monitor symbols, if any can be found. Return, if possible, a handle for the EPROM monitor for Lark. This is useful for looking at monitor statics. Swinehart, April 6, 1987 9:32:50 am PDT Put wDir argument everywhere to compensate for not having any other way to pass it changes to: ReadProgramFromDisk, ReadProgramFromMBFile, BuildSearchTable, PatchFromFile, ProcedureEnclosing, FindVariable, Monitor ΚΪ˜šœ™Icode™<—šœ0™0K™'—J˜šΟk ˜ Jšœœœ˜Jšœœœ˜Jšœ œ9˜GJ˜—Jšœœ œ˜#J™Jšœ™J˜Jšœœ˜%J˜šœ œœ˜Jšœ œœ˜Jšœœ˜J˜J˜—J˜J™&J˜J˜Jšœœœ ˜J˜Jšœ œœ˜%šœœœ˜Jšœœ œœ ˜#J˜J˜—Jšœ™J˜Jšœ œœ˜&šœœœ˜ Jšœ œ˜J˜Jšœ ˜J˜J˜—Jšœ œœ˜"šœœœ˜Jšœ œœœ˜*Jšœ œœ œ˜#Jšœœœ˜J˜+J˜%Jšœ œœ˜$Jšœ œ˜!J˜—J˜J™Jš Οnœœœœœ˜MJ˜J™;Jšž œœœœ˜AJ˜J™OJšžœœ˜-J˜JšœJ™JJšžœœ˜(J˜JšœS™SJšžœœœœœœ9œœ ˜›J˜Jšžœœœ*œœœ9œœ ˜ΌJ˜Jšœx™xJšžœœœœœœ œ˜bJ˜J™3Jš žœœ>œ œœ˜uJ˜J™kJšž œœ#œœœœ œœœœ ˜J˜Jšœš™šJš žœœ?œœ œœ˜‹J˜Jšœ™Jšž œœœœœ œœœ˜ŠJ˜J™mJšžœœœœœ9œœ˜yJ˜J˜Jšœœ˜5Jšœœ˜:Jšœœ#Οr˜LJ˜™'K™RKšœ Ÿv™‚—K™—…— –ξ