DIRECTORY IO, Rope; DisassembleSPARC: DEFINITIONS ~ { ROPE: TYPE ~ Rope.ROPE; SymID: TYPE ~ CARD; nullID: SymID = 0; SymEntry: TYPE = RECORD[ symID: SymID, name: ROPE, type: CARD, value: CARD, size: CARD, fileSeqNum: CARD]; nullSymEntry: SymEntry ~ [nullID, NIL, 0, 0, 0, 0]; Sym: TYPE = RECORD [name: ROPE, value, nBytes: CARD]; unknownSize: CARD = CARD.LAST; PCInfo: TYPE = RECORD[ procName: ROPE, procSymID: CARD, fileName: ROPE, fileSeqNum: CARD, guessedEmbeddedFileName: ROPE, guessedEmbeddedFileSymID: CARD]; nullPCInfo: PCInfo = [NIL, 0, NIL, 0, NIL, 0]; nullAddr: CARD = 0; RegisterModel: TYPE ~ REF RegisterModelRep; RegisterModelRep: TYPE ~ ARRAY Register OF RegisterContents := ALL[[0,FALSE]]; RegisterContents: TYPE ~ RECORD [ val: CARD, known: BOOL ]; Register: TYPE ~ [0 .. 32); DebugNub: TYPE ~ REF DebugNubPrivate; DebugNubPrivate: TYPE ~ RECORD [ GetMatchingSymEntryByName: PROC [nub: DebugNub, pattern: ROPE ¬ NIL, caseSensitive: BOOLEAN, types: CARD ¬ allTypes, classes: Classes ¬ all, nth: INT, from: SymID ¬ nullID] RETURNS [SymEntry], GetMatchingSymEntryByValue: PROC [nub: DebugNub, val: CARD ¬ nullVal, types: CARD ¬ allTypes, classes: Classes ¬ all, nth: INT, from: SymID ¬ nullID] RETURNS [SymEntry], GetSymEntryByID: PROC [nub: DebugNub, id: SymID] RETURNS [SymEntry], GetInterfaceSlot: PROC [nub: DebugNub, ifc, item: ROPE] RETURNS [addr: CARD], PCtoInfo: PROC [nub: DebugNub, pc: CARD] RETURNS [PCInfo], FetchWord: PROC [nub: DebugNub, addr: CARD] RETURNS [WORD], data: REF ANY ¬ NIL]; AddressFault: ERROR [address: LONG POINTER]; Classes: TYPE ~ {all, external, internal, none}; typeUndef: CARD ~ 0; typeExternal: CARD ~ 1; typeAbs: CARD ~ 2; typeText: CARD ~ 4; typeData: CARD ~ 6; typeBss: CARD ~ 8; typePatch: CARD ~ 1CH; typeModule: CARD ~ 1EH; typeMask: CARD ~ 1EH; allTypes: CARD ~ CARD.LAST; nullVal: CARD = 0; DisassembleProc: PROC [to: IO.STREAM, startPC, nBytes: CARD, nub: DebugNub, regs: RegisterModel ¬ NIL, stop: REF BOOL ¬ NIL]; DisassembleInstr: PROC [to: REF TEXT, pc: CARD, word: WORD, nub: DebugNub, regs: RegisterModel ¬ NIL] RETURNS [REF TEXT]; FindSym: PROC [name: ROPE, nub: DebugNub, textOnly: BOOL] RETURNS [SymEntry]; EstSize: PROC [nub: DebugNub, e1: SymEntry, textOnly: BOOL] RETURNS [nBytes: CARD]; CardFromRope: PROC [ROPE] RETURNS [CARD]; LocalGetInterfaceSlot: PROC [nub: DebugNub, ifc, item: ROPE] RETURNS [addr: CARD]; Failed: ERROR [errMsg: ROPE]; }. Š DisassembleSPARC.mesa Copyright Σ 1992 by Xerox Corporation. All rights reserved. Last tweaked by Mike Spreitzer July 23, 1992 2:00 pm PDT When from#NIL, pattern defaults to from's name. type matches types iff types=allTypes or type&typeMask=types&typeMask. Returns nullSymEntry if not found. May return nullAddr. May return nullPCInfo. May raise AddressFault. May raise Failed, AddressFault. May raise Failed, AddressFault. name may be A number (as accepted by CardFromRope); N1.N2 (where N1 names an interface record and N2 names an item in that interface); N1.N2 (where N1 names a compilation unit and N2 names a text item in that interface); or Gn (a name defined in the loader symbols (ie, underscore plus a top-level C name)). May raise Failed, AddressFault. May return nBytes=unknownSize. Accepts both Mesa syntax and C's hex syntax. May raise Convert.Error. For local world; ignores nub. ΚΣ–"cedarcode" style•NewlineDelimiter ™codešœ™Kšœ Οeœ1™