lsym
The lsym command list symbols from the loaded symbol table.
Command Format
ls [-ln] [-a addr] [symbol]
where:
| -l | list in long form with values |
| -n | list in numerical (value) order. Default is in name order |
| -a addr | find symbol closest to addr |
| symbol | lookup and display value for symbol. symbol can specify 'wildcard', see below. |
Functional description
The lsym command display information from the loaded symbol table. The -l switch lists the symbols values along with their names. The -n switch changes the sort order from symbol names to symbol values.
Wildcard values can be used with the symbol name. Valid wildcard characters are '?' and '*'. The '?' matches any single character at that position while the '*' character matches any number of any characters. See the examples for more information.
When using the -a addr switch the symbol table will be searched for the symbol with the value closest to the addr expression. If no symbol is found within 20KB of the given value no symbol is found.
Examples:
Define a couple of symbols using the sym command.
PMON> sym sym 0x1000
PMON> sym syx 0x2000
PMON> sym symbol 0x23800
List the entire symbol table in short form.
PMON> lsym
Pmon _ftext etext start sym symbol syx
PMON> lsym -n
sym syx symbol etext Pmon _ftext start
List the entire symbol table in long form.
PMON> lsym -l
80010000 Pmon
8008cd10 _ftext
07f80000 etext
80100000 start
00001000 sym
00023800 symbol
00002000 syx
PMON> lsym -ln
00001000 sym
00002000 syx
00023800 symbol
07f80000 etext
80010000 Pmon
8008cd10 _ftext
80100000 start
List the symbols matching the wildcard specification. Note how the wildcard specification narrow down the selection and targets the desired result.
PMON> lsym s*
start sym symbol syx
PMON> lsym -l s*
80100000 start
00001000 sym
00023800 symbol
00002000 syx
PMON> lsym -l sy*
00001000 sym
00023800 symbol
00002000 syx
PMON> lsym -l sy?
00001000 sym
00002000 syx
PMON> lsym -l sym*
00001000 sym
00023800 symbol
PMON> ls -l sym?*
00023800 symbol
Lookup an address in the symbol table.
PMON> lsym -a 0x23834
00023834 = symbol+0x34
Environment
The command uses no environment variable.
See Also
The sym commands.

