XListerDoc.tioga PCEDAR 1.1 % XLister Russ Atkinson, Andy Litman, Jim Foote Σ Copyright 1989 Xerox Corporation. All rights reserved. Abstract: XLister is a program to produce human readable files from mob files produced by the Mimosa compiler and the Cinder. XLister registers a variety of commands, each of which produces a different set of information from a given list of mob files. Created by: Russ Atkinson, Andy Litman, Jim Foote Maintained by: Atkinson.pa, Keywords: XLister, Mob files, Object files XEROX Xerox Corporation Palo Alto Research Center 3333 Coyote Hill Road Palo Alto, California 94304 1. XLister overview [XLister is functionally equivalent of the Cedar7.0 PrincOps Lister and the XDE 14.0 Lister. Where command names conflict with Lister commands, an "X" is prefixed. For instance "SymbolLister" becomes "XSymbolLister". -- AHL] XLister is a program to produce human readable files from mob files produced by the Mimosa compiler and the Cinder. XLister registers a variety of commands, each of which produces a different set of information from a given list of mob files. Each command takes a list of files as arguments. The default input file extension is mob. The output file extension is derived from the command name, and is given with the description of each command. There are no switches or options. Each listing file starts with information about the mob file being examined. As an example, for the command "mobList XLister" the output file is XLister.mobList, which starts with XLister.mobList object: XLister.mob {4365c935458b} source: XLister.config {00008a129bc4 (October 24, 1983 7:14 pm)} creator: {0c0b0003000f} The version stamps are printed in hexadecimal. In the case of source files, the version stamps are also interpreted as create dates. The creator is the version stamp of the mimosa compiler or cinder that produced the mob file. As a Cedar7.0 component, XLister is described by XLister.df. and the tool is named XLister.bcd. As a PCedar1.2 component the XLister is described by XLister-sun4.df and the tool is named XLister.c2c.o. The registered commands are listed below. 2. XLister commands MobLister This commands lists the contents of a mob file, which may contain multiple modules. The extension for the produced file is mobList. The information produced includes: Configurations - for mob files produced by the Cinder, this group gives information about the configurations in the mob file. Imports - lists the definitions modules that are imported by the mob file. Exports - lists the definitions modules that are exported by the mob file. Exported variables - lists the variables (if any) that are exported by the mob file. Modules - lists the modules that are contained by the mob file. An example listing follows: CodeListerImpl [14], file: CodeListerImpl [4], config: XLister [0] switches: bc-jlns, packageable, framesize: 75, gfi: 2, ngfi: 2, links: code code: (self) [base: 52, pages: 13], offset: 24B, length: 13756B, link space symbols: CodeListerImpl [base: 19, pages: 38+2] #links: 19, links: proc[19,11], proc[12,0], proc[13,0], proc[16,23], proc[16,18], proc[1,25], proc[12,12], proc[12,25], proc[1,4], proc[11,6], proc[9,15], proc[11,5], proc[1,22], proc[1,27], proc[1,20], proc[1,17], proc[14,9], proc[13,29], proc[14,13] #types: 5, offset: 4, indices: [10], [1], [11], [12], [13] frame type: 2 #ref lits: 33, offset: 9, indices: [285], [286], [287], [288], [289], [290], [226], [282], [291], [292], [293], [294], [295], [296], [297], [298], [299], [300], [301], [302], [303], [304], [305], [306], [307], [308], [309], [310], [311], [312], [313], [314], [315] Files - lists the files (and their version stamps) that are necessary to make the mob file. Frame Packs - Spaces - XBodyLister This commands lists the bodies of a single module mob file. The extension for the produced file is bodyList. Each body listing entry gives the name of the procedure (if any), the entry point (for procedures), the frame address (for nested procedures), the context index, and the nesting level of the body. An example of the first few entries in CodeListerImpl.bodyList is: Body: CodeListerImpl, ep: 0, attrs: --n context: 20, level: 2 Body: DigestFGT, ep: 1, attrs: x-- context: 34, level: 2 Body: AddMyEntry, ep: 6, frame addr: 10, attrs: x-- context: 0, level: 3 Body: (anon) context: 56, level: 3 Body: (anon) context: 58, level: 3 Body: AddBodyFGT, ep: 4, frame addr: 26, attrs: x-n context: 60, level: 3 XCodeLister Not yet implemented. XExportsLister This commands lists the exports of a mob file, which may contain multiple modules. The extension for the produced file is exportsList. An example for the first few entries of MobListerUtilsImpl is: MobListerUtils [0], file: MobListerUtils [54], ~typeExported, #links: 29, links: 0: MobErr: proc[1,0] 1: InitMobTab: proc[1,31] 2: ReadMob: proc[1,27] 3: FreeMob: proc[1,28] 4: PrintSE: proc[1,1] 5: PrintSei: proc[1,10] ... XFGTLister This commands lists the fine grain table of a single module mob file. The extension for the produced file is fgtList. XGlobalFramesLister This commands lists the global frames of a mob file, which may contain multiple modules. The extension for the produced file is globalFramesList. RTMobLister This commands lists the runtime types information for a mob file, which may contain multiple modules. The extension for the produced file is rtMobList. For example, the first few entries of MobListerUtilsImpl.rtMobList read: Types: 12, Ref Literals: 297, 88 units of RC map, 1918 units of literals: Types[1800]: [0] sei: [2:8316], segment: [10], rcMap: [2], UTF: [stamp: [2], sei: [0:1258]], canonical [1814] (12) #{b102d480bd07e750,58} [1] sei: [2:2704], segment: [10], rcMap: [6], UTF: [stamp: [1], sei: [2:2704]], canonical [1822] (28) :Arr#{4cd0a28e4ccc5059,118}^#{3f37b8d0aa9eb804,628} [2] sei: [2:4436], segment: [10], rcMap: [6], UTF: [stamp: [1], sei: [2:4436]], canonical [1822] (28) :Arr#{4cd0a28e4ccc5059,118}^#{3f37b8d0aa9eb804,628} ... ShortMobLister This commands lists the contents of a mob file, which may contain multiple modules. The extension for the produced file is mobList. The listing has slightly less information than that produced by MobLister. XSortedDefsLister This command takes a list of mob files from the command line and produces a single output file, Symbols.sort which approximates the source necessary to produce all the top level definitions in the definitions files contained in the set of input files. Cinder output and implementation modules are filtered out and ignored. The program cannot exactly reproduce the original source for default field values since information is lost in the compilation process. For large constant values, it simply notes that there is a constant default value. Below is a segment of a SortedDefs listing : ExportInterface: --RPCLupine--PROC [user: RPC.Principal, password: RPC.EncryptionKey, interface: RPC.InterfaceName, dispatcher: Dispatcher, stubProtocol: RPC.VersionRange, localOnly: BOOLEAN _ FALSE] RETURNS [interfaceInstance: ExportHandle]; Exports: --AMModel--PROC [context: Context] RETURNS [ LIST OF PartialInterfaceInstance]; EXPRecord: --MobDefs--TYPE = RECORD[name: NameRecord, size: [0..255], port: Portable, namedInstance: BOOL, typeExported: BOOL, file: FTIndex, links: ARRAY [0..0) OF Link]; ExpSingleMax: --Ieee--INTEGER = 127; ExpSingleMin: --Ieee--INTEGER = -126; exptype: --MobDefs--Table.Selector = 6; Ext: --Ieee--TYPE = RECORD[det: Details, exp: INTEGER, frac: LongNumber]; Extended: --Real--TYPE = RECORD[type: NumberType, sign: BOOL, exp: INTEGER, frac: LONG CARDINAL]; ExtendFileHeader: --FileInternal--PROC [file: File.Handle, newRunPages: CARDINAL, newPropertyPages: CARDINAL]; The current implementation of this command writes a plain-text file with two spaces for each indentation level. The Tioga exec command TiogaMesa properly converts this into levels and provides mesa formatting. An outer level node for each initial letter of the alphabet is produced so clipping to top level allows faster positioning within the file. XSortedSymbolLister This command takes a list of mob files from the command line and produces a single output file, Symbols.sort which approximates the source necessary to produce all the top level definitions in the compiler output files contained in the set of input files. Cinder output is filtered out and ignored. It works much like XSortedDefsLister, except that top level declarations in program modules are included as well. XSymbolLister This commands lists the bodies of a single module mob file. The extension for the produced file is symbolList. XUnboundLister This commands lists the unbound exports for a mob file, which may contain multiple modules. The output goes to the command output stream, rather than to a file. This command is useful to determine if there are exported files with some of their entries unbound. XUsingLister This command generates a DIRECTORY clause for a single module mob file. The extension for the produced file is usingList. The results may not be entirely correct, yet should be quite close (unfortunately, the information in the mob file may be ambiguous). The intention is for people to develop modules without using USING clauses, then to use this command to generate those clauses. Where there are extra names or missing names in the clauses the compiler will generate sufficient messages to allow repair of the USING clauses in (typically) a single pass. MobDetails This command generates a rather literal printout of some of the data structures in a mob file; intended to help language tool developers understand said data structures. XInterfaceLister This command generates a listing of the interface item numbers for the various exported items of an definitions .mob file. ‚ XListerDoc.tioga JKF February 27, 1990 1:19:14 pm PST Last tweaked by Mike Spreitzer on November 15, 1989 9:45:42 am PST Κ2–(cedardoc) style•NewlineDelimiter ™•Mark LastEditedšœ™Icode– LastEdited™$K– LastEdited™BJ– LastEdited™—Iunleaded– centerHeaderšΟs˜L•CharSets ο– centerFooterš ˜ Ititle˜Iauthors˜%IabstractšΟp8˜9OšΟb œ˜ Iblock˜σOšŸ œ&˜1OšŸœ˜'OšŸ œ!˜*O˜I boilerplateš ΟqœΟoœ‘œ‘œ‘ ˜sheadšœ˜P˜ΰP˜σPšœVΟiœ“˜νšœ΄˜΄item˜S˜"S˜@S˜——P˜δP˜τ— šœ˜ šœ ˜ Pšœ|’œ%˜¨Sš’œo˜Sš’ œC˜LSš’ œC˜LSš’œB˜VSš’ œU˜^indent˜šœB˜BKšœ ˜ Kšœ+˜+KšœK˜KKšœ/˜/Kšœθ˜ϋKšœ˜:Kšœ ˜ Kšœ#ε˜ˆK˜——Sš’œV˜]Sš’ œ˜%Sš’œ˜ S˜— šœ ˜ Pšœd’œ‹˜χ ˜šœ'˜'K˜K˜—˜"K˜K˜—˜3K˜K˜—˜ K˜K˜—˜ K˜K˜—˜3K˜K˜——— šœ ˜ Pšœ˜— šœ˜Pšœ{’ œB˜ΘJ˜˜PJ˜J˜J˜J˜J˜J˜J˜—— šœ ˜ Pšœn’œ˜— šœ˜Pšœ’œ˜©— šœ ˜ PšœŽ’ œ˜™˜HPšœ*Οkœ˜JJ˜˜ šœ.£œ(˜YJ˜"—šœ.£œ(˜YJ˜?—šœ.£œ(˜YJ˜?—J˜——P˜— šœ˜Pšœ|’œN˜Ρ— ˜Pšœ`Οe œδ˜ΠšΟnœΟc £œ£œ ˜9Jšœ £œ£œ˜;Jšœ&£œ˜8Jšœ £œ£œ£œ#˜F—š₯œ¦ £œ£œ˜5Jš£œ£œ˜"—šœ ¦ £œ£œ#˜FJšœ£œ£œ˜HJšœ£œ£œ˜—Jšœ¦£œ˜$Jšœ¦£œ˜%Jšœ ¦ œ˜'Jšœ¦£œ£œ£œ˜Iš œ ¦£œ£œ£œ£œ˜LJšœ£œ£œ˜—š₯œ¦£œ˜;Jšœ £œ£œ˜3—Pšœˆ€ œΠ˜α— ˜Pšœ`€ œ²˜ž— šœ ˜ Pšœd’ œ˜q— šœ˜Pšœ†˜†— šœ ˜ Pš œ£ œN’ œΗ£œΑ£œ&˜±— ˜ Pšœ©˜©— ˜Pšœz˜z———…—',Ζ