Next | Prev | Up | Top | Contents | Index

Using symmon Commands

This section describes the symmon commands. "symmon's dbgmon Mode Commands" describes the general symmon commands, which are referred to as dbgmon mode commands. "Using symmon's Kernel Print Command" describes the symmon command kp. The kp command briefly accesses another mode of the kernel debugger, Kernel Print mode (also called KP mode). After symmon executes the kp command, it returns to dbgmon mode.

Use symmon's dgbmon mode when you need ordinary debugger commands such as brk, dump, get. Use symmon's KP mode when you want to view kernel structures and other information.


Help for symmon Commands

To see a listing of messages concerning the symmon commands while running symmon, type a question mark (?) and press <Enter>. In addition, commands that require arguments give a usage summary if you enter the command without arguments.


symmon's dbgmon Mode Commands

This section describes the commands of symmon's dbgmon mode. Each heading lists the name of the command, its option flags, and its arguments. The headings use square brackets to indicate optional arguments and option flags. Following each heading is text that describes the purpose of the command. Following the command description are descriptions of each argument or option flag (if any). Different systems and operating system releases may have slightly different commands or options. For example, symmon is part of the PROM on some systems, while it is loaded at boot time on others. (See Table 10-5.)

symmon's dbgmon Mode Commands
CommandDescription
brk [addresslist]Mark breakpoints at specified addresses.
btShow the backtrace leading up to entry to the debugger. Also see the kp ubt command.
cLeave the debugger environment and continue execution.
cacheflush rangeFlush both the instruction and the data caches over the range of addresses given.
clearClear the screen.
call [pc] [arg1, arg2, arg3, arg4]Execute the code starting at the address specified.
dis rangeDisassemble MIPS assembly instructions for the specified range of memory locations.
dump [-Bcdoux] [-bhw] rangeGet a formatted display of an area of memory.
g [-bhw] locationDisplay the contents of a memory location or a register.
goto listContinue execution of the client process from the location indicated by the client pc register to the location specified.
helpList a short summary of the built-in commands.
hx namelistConvert a name or list of names into their equivalent hexadecimal address values.
lkaddr addressPrint symbols "near" the given address.
lkup namePrint address of the specific partial name.
nm addresslistDisplay the equivalent symbol name of a hexadecimal address or list of hexadecimal addresses.
p [-bhw] location valueSet the contents of the register or memory location to a value.
s [count] and S [count]Execute one or more instructions of client code.
sleepPut a processor into the waiting loop on multiprocessing systems.
string address [maxlen]Display memory as a null-terminated ASCII string.
tlbdump [range]Display the current contents of an R2000/3000/4000 address translation buffer.
tlbflush [range]Flush mappings from R2000/3000/4000 address translation buffer.
tlbmap [-i index]
[-ndgv] vaddress paddress
Establish a virtual-to-physical address map in the R2000/3000/4000 translation buffer.
tlbpid [pid]Get or set the process identifier (pid).
tlbptov physaddrDisplay the tlb entries that map a physical address.
tlbvtop vaddress [pid]Display the R2000/3000/4000 translation buffer entries that map the specified virtual address.
unbrk bpnumlistRemove breakpoints.
wakeWake up slave processors.
wpt
[r|w|rw] [0|physaddr]
Set a read, write, or read/write watch point at physical address physaddr, using the R4000 watch point registers.


brk Command

Use brk to mark breakpoints at specified addresses. If you do not specify an argument, brk shows all currently set breakpoints.

Synopsis

brk [addresslist]

Arguments

addresslist

Use this parameter to specify the addresses at which you want breakpoints. You can enter addresses either numerically or symbolically.

If you enter the addresses numerically, brk assumes that all address values are in base 10 unless you specify otherwise. To enter a hexadecimal value, precede the value with 0x. To enter an octal value, precede the value with 0.

If you enter the addresses as symbolic names, enter the addresses according to the format symbol or symbol+hexval, where hexval is a word-aligned hexadecimal value.


bt Command

bt shows the backtrace leading up to the entry to the debugger. However, you will probably find the information from kp ubt to be more useful. In general, backtraces do not go past the last interrupt or exception.

Synopsis

bt


c Command

c allows you to leave the debugger environment and continue execution. c directs symmon to continue execution from the location indicated by the current value of the client program counter register. This command is the counterpart of the <ctrl-a> character combination that returns control to the debugger. See also q(uit).

Synopsis

c


call Command

call executes the code starting at the address specified.

Synopsis

call [pc] [arg1 arg2 arg3 arg4]

Arguments

[pc]

Use this argument to specify the starting address of a client routine. If no argument is specified, the saved pc is used.

[args]

Use these optional arguments to specify the arguments (up to four) that you want to pass to the routine pointed to by pc.

dis Command

dis disassembles MIPS assembly instructions for the specified range of memory locations.

Synopsis

dis range

Arguments

range

Use this argument to specify the range of memory you want to display. You can specify the range argument in one of the following three formats:

baserange is a base address. Use this format to disassemble the contents of a single location. The base address can be a hexadecimal address, a symbol name, or a symbol name plus a hexadecimal offset.

base#count range is a base address, followed by a number "#" character, followed by a count value. Use this format to disassemble a range of count words, starting at the base address. The base address can be a hexadecimal address, a symbol name, or a symbol name plus a hexadecimal offset. However, the count value is a hexadecimal value.

base:limit range is a base address, followed by a colon ":" character, followed by an upper limit address. base is a hexadecimal address or a symbol name. Use this format to disassemble the contents of those words whose addresses are greater than or equal to the base address, but less than the limit address. The value given as the base address or as the limit can be a hexadecimal address, a symbol name, or a symbol name plus a hexadecimal offset.

Note: In all the formats described above, the base address must be word-aligned.


dump Command

Use dump to get a formatted display of an area of memory.

Synopsis

dump [-Bcdoux] [-bhw] range

Arguments

[-Bcdoux]

Use these options to set the format in which dump displays the contents of a memory location. The default format is hexadecimal. The formats associated with these options are:

x = hexadecimal
o = octal
d = decimal
u = unsigned decimal
c = ASCII
B = binary

[-bhw]

Use these options to specify the size of the memory location. The default is word. The associated sizes are:

b = byte
h = half-word
w = word

range

Use range to specify the amount of memory to be displayed. You can specify range in one of the following formats:

base range is a base address. Use this format to disassemble the contents of a single location. The base address can be a hexadecimal address, a symbol name, or a symbol name plus a hexadecimal offset.

base#count range is a base address, followed by a number "#" character, followed by a count value. Use this format to disassemble a range of count words, starting at the base address. The base address can be a hexadecimal address, a symbol name, or a symbol name plus a hexadecimal offset. However, the count value is a hexadecimal value.

base:limit range is a base address, followed by a colon ":" character, followed by an upper limit address. base is a hexadecimal address or a symbol name. Use this format to disassemble the contents of those words whose addresses are greater than or equal to the base address, but less than the limit address. The value given as the base address or as the limit can be a hexadecimal address, a symbol name, or a symbol name plus a hexadecimal offset.


g Command

Use g (or get) to display the contents of a memory location, general-purpose register, special-purpose register, or a system coprocessor register.

Synopsis

g [-bhw] location

Arguments

[-bhw]

Use these options to specify the size of the location you want to display. The default size is a word. The sizes associated with these options are:

b = byte
h = half-word
w = word

location

Use location to specify the location or register you want to get. The format for a location or register can be a hexadecimal value or the symbolic name (plus a hexadecimal offset) of the address or the client register you want to display.

To specify one of the 32 general-purpose registers, 0 through 31, use the names r0 through r31, or use the compiler-usage names. See Table 10-1 for a list of such registers.


goto Command

goto continues the execution of the client process from the location indicated by the client program counter (pc register) to the instruction at the location(s) you specify. Use this command to set a list of temporary breakpoints.

Synopsis

goto list

Arguments

list

Use this parameter to specify a list of hexadecimal addresses and/or names of locations at which you want to set temporary breakpoints. These temporary breakpoints are automatically removed once they have been encountered.

hx Command

Use hx to convert a name or list of names into their equivalent hexadecimal address values.

Synopsis

hx namelist

Arguments

namelist

Use this argument to specify the list of names you want to convert. This argument can be one or more symbol names (plus hexadecimal offset).
The next two items (lkaddr and lkup) are not available in older versions:


lkaddr Command

lkaddr prints symbols "near" the given address.

Synopsis

lkaddr address

Arguments

address

Use this argument to specify the starting address of the string you want to display.

lkup Command

name may be only a partial name, such as "init.". Symbols containing name are printed with their respective addresses.

Synopsis

lkup name

Arguments

name

name is a filename.

nm Command

Use nm to display the equivalent symbol name (plus hexadecimal offset) of a hexadecimal address or list of hexadecimal addresses.

Synopsis

nm addresslist

Arguments

addresslist

Use this parameter to specify the addresses at which you want breakpoints. You can enter addresses either numerically or symbolically.

p Command

Use p (or put) to set the contents of the register or memory location to a value.

Synopsis

p [-bhw] location value

Arguments

[-bhw]

Use these options to specify the size of the memory location or register value you want to set. The default size is word. The sizes associated with each of these options are:

b = byte
h = half-word
w = word

location

Use this argument to specify the memory location or register you want to set.

To specify a memory location, use the hexadecimal name of the memory location, or the symbolic name (plus a hexadecimal offset) of a memory location you want to set.

To specify any of the 32 general-purpose registers, use the names r0, r1, r2 through r31, or use the compiler mnemonics for these registers (see Table 10-1). You can also set special-purpose registers and the system coprocessor registers (see Table 10-2).

To specify the pc register, use the entry point of a client routine as the location argument.

value

Use this argument to specify the hexadecimal value you want to write to the specified memory location or register (value is always assumed to be hexadecimal.)

sleep Command

Use sleep to put a processor into the waiting loop on multiprocessing systems. To awaken the sleeping processor, use the wake command. On IRIS-4D 100/200/300/400 Series workstations, do not use this command on CPU 0.

Synopsis

sleep


s [count] and S [count]

Both s and S allow you to execute one or more instructions of client code. These two commands differ only in the way they handle jal and bal, instructions that execute subroutines.

When S executes an instruction that calls a subroutine, it executes the entire subroutine as a single instruction, up to and including the return instruction. S fails to regain control if the subprocedure does not return.

When s executes an instruction that calls a subroutine, it counts the jump to the subroutine as a single instruction, then executes instructions within that subroutine up to the number you have specified (minus the one counted when executing the jump instruction). If you specify only one instruction (the default), and the next instruction calls a subroutine, s jumps to the subroutine and stops.

Synopsis

s [count] S [count]

Arguments

[count]

Use this optional argument to specify the number of instructions you want s or S to execute. The default is 1.

string Command

Use this command to display memory as a null-terminated ASCII string. This argument escapes non-printable characters with the backslash character, just as is done in the C programming language.

Synopsis

string address [maxlen]

Arguments

address

Use this argument to specify the starting address of the string you want to display.

[maxlen]

Use this optional argument to specify the length of the string. The default value for this argument is 70.

tlbdump Command

Use tlbdump to display the current contents of an R2000/3000/4000 address translation buffer.

Synopsis

tlbdump [range]

Arguments

[range]

Use this optional argument to select a range of tlb entries. The default behavior is to display the entire contents of tlb. The three formats for range are:

baserange is a hexadecimal value. An index into tlb. tlbdump displays the contents of this single location.

base#countrange is a table index followed by a number "#" character, followed by a count value. tlbdump displays the contents of a range of count tlb entries starting at the tlb entry whose index is base. Both base and count are hexadecimal values.

base:limitrange is a table index followed by a colon ":" character, followed by an upper limit index. Use this format to display a range of tlb entries whose indices are greater than or equal to base, but less than limit. These index values are all hexadecimal values.


tlbflush Command

Use tlbflush to flush mappings from the R2000/3000/4000 address translation buffer, thus making them invalid, not matching any possible address/pid pair. You can use this command to clear translations for both symmon and the client process.

Synopsis

tlbflush [range]

Arguments

[range]

Use this optional argument to specify the range of tlb entries that you want to flush. If you do not specify a range, tlbflush defaults to clearing all tlb entries. To specify a [range], use one of the following formats:

Note: Multiprocessor systems have an address translation buffer associated with each processor. A command that dumps or changes translation buffers affects only the processor associated with the debug terminal from which such commands issued.


tlbmap Command

Use tlbmap to establish a virtual to physical address map in the R2000/3000/4000 translation buffer. You can use tlbmap to establish mappings for both symmon and the client process.

Synopsis

tlbmap [-i index] [-ndgv] [-dgv] [-c algo] vaddress paddress

Arguments

[-i index]

Use the -i option to specify the particular tlb entry, index, that you want to use to contain the mapping. If you do not specify a tlb index, tlbmap uses a random tlb entry, at an index ranging 8 to 63.

[-ndgv]

(R2000/3000 only)

[-dgv]

(R4000 only)

Use these options to set bits in the tlb entry for the map. Each option controls a single bit. By default, these bits are unset (zero). The significance of setting a bit (and the associated options) are:

n = non-cacheable (R2000/3000 only)
d = data
g = global
v = valid

[-c algo]

(R4000 only)

Use this to set the cache algorithm in the tlb entry for the map. The algorithms are specified by a number. The designations are:

0: reserved
1: reserved
2: uncached
3: cacheable, non-coherent
4: cacheable, coherent exclusive
5: cacheable, coherent exclusive on write
6: cacheable, coherent update on write
7: reserved

vaddress

Use this argument to specify the virtual address side of the map.

paddress

Use this argument to specify the physical address side of the map.

tlbpid Command

Use tlbpid to get or set the process identifier (pid), a value in the R2000/3000/4000 system coprocessor register, tlbhi. The tlbpid command affects only the process identifier used by symmon and client code executed through the call command. tlbpid does not affect the process identifier used when client code is executed by single stepping or when continuing execution.

Synopsis

tlbpid [pid]

Arguments

[pid]

Use this optional argument to indicate the value to which you want tlbpid to set the pid value in the R2000/3000/4000 coprocessor register, tlbhi.
If you specify no [pid] argument, tlbpid displays the pid value currently in the R2000/3000/4000 coprocessor register, tlbhi.


tlbptov Command

Use tlbptov to display the tlb entries that map a physical address. tlbptov searches the R2000/3000/4000 translation buffer, looking for translations that map the specified physical address. tlbptov displays all matches, whether valid or invalid.

Synopsis

tlbptov physaddr

Arguments

physaddr

Use this argument to specify the physical address for which you want to find tlb entries.

tlbvtop Command

Use tlbvtop to display the R2000/3000/4000 translation buffer entries that map the specified virtual address.

Synopsis

tlbvtop vaddress [pid]

Arguments

vaddress

Use this argument to specify the virtual address for which you want to find tlb entries.

[pid]

Use this optional argument to specify the pid associated with the tlb entry. If you do not specify a pid, tlbvtop defaults to using the pid value currently in the coprocessor register tlbhi.

unbrk Command

Use unbrk to remove breakpoints.

Synopsis

unbrk bpnumlist

Arguments

bpnumlist

Use this argument to specify the ordinal of a particular breakpoint you want to remove. Use the brk command to get the ordinal of a particular breakpoint.

wake Command

Use wake to wake up slave processors. wake brings all slave processors into a waiting loop, whether those processors are scanning for a keystroke on the console to drop into symmon or looking for the address to which to jump to execute the boot() routine.

Synopsis

wake


wpt Command

Use wpt to set a read, write, or read/write watch point on a physical address, using the R4000 watch point registers.

Synopsis

wpt [r|w|rw|] [0|physaddr]

Arguments

r

Read

w

Write

rw

Read/write

physaddr

Double word aligned address. The watch point will trip on any access within the next eight bytes.

0

An argument of 0 clears the watch point.

Next | Prev | Up | Top | Contents | Index