SparcSymbols.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
written by Ch. Le Cocq, September 16, 1988
Christian Le Cocq September 16, 1988 3:48:30 pm PDT
Provides symbol lookup in a a.out file.
DIRECTORY
IO USING [STREAM],
RedBlackTree USING [Table],
Rope USING [ROPE];
SparcSymbols: CEDAR DEFINITIONS
~ BEGIN
Tables: TYPE ~ REF TablesRec;
TablesRec: TYPE ~ RECORD[byAddr, byName: RedBlackTree.Table];
GetSymbols: PROC [s: IO.STREAM] RETURNS [tables: Tables];
expect a file following the layout described in man a.out.
GetClosestName: PUBLIC PROC [addr: CARD32, tables: Tables] RETURNS [name: Rope.ROPE];
finds the name in the table which value is equal to or smaller than addr.
GetAddress: PUBLIC PROC [name: Rope.ROPE, tables: Tables] RETURNS [addr: CARD32];
gets the address of the name which matches the best the given name.
ListTables: PUBLIC PROC [out: IO.STREAM, tables: Tables];
in case you want to know everything at once...
END.