toption in the modifier and thread parameter. The format characters are
c. If no modifier is specified, the last one specified to it is used. addr can be a string, and it is printed as it is. For example,
print/x "eax = " $eax "\necx = " $ecx "\n"
will print like
eax = xxxxxx ecx = yyyyyy
toption in the modifier and thread parameter. Warning: since there is no delimiter between expressions, strange things may happen. It's best to enclose each expression in parentheses.
Toption to specify the non-current target user space. Without
uoption, the address is considered in the kernel space, and wrong space address is rejected with an error message. This option can be used only if it is supported by machine dependent routines.
toption except that the break point is valid for all threads which belong to the same task as the specified target thread.
uoption, except that the break point is valid for all threads which share the same address space even if
toption is specified.
toption is used only to specify the target shared space. Without
Uhave the same meanings.
Uis useful for setting a user space break point in non-current address space with
toption such as in an emulation library space. This option can be used only if it is supported by machine dependent routines.
Warning: if a user text is shadowed by a normal user space debugger,
user space break points may not work correctly. Setting a break point
at the low-level code paths may also cause strange behavior.
#, or by addr like specified in
continuecommand is executed, the command execution stops there, and the stopped thread resumes execution. If the command execution reaches the end of the list, and it enters into a command input mode. For example,
set $work0 0 break/Tu xxx_start $task7.0 cond #1 (1) set $work0 1; set $work1 0; cont break/T vm_fault $task7.0 cond #2 ($work0) set $work1 ($work1+1); cont break/Tu xxx_end $task7.0 cond #3 ($work0) print $work1 " faults\n"; set $work0 0 cont
will print page fault counts from
poption is specified, print each instruction at each step. Otherwise, only print the last instruction.
Warning: depending on machine type, it may not be possible to
single-step through some low-level code paths or user space code. On
machines with software-emulated single-stepping (e.g., pmax), stepping
through code executed by interrupt handlers will probably do the wrong
/c, count instructions while executing. Some machines (e.g., pmax) also count loads and stores.
Warning: when counting, the debugger is really silently single-stepping.
This means that single-stepping on low-level code may cause strange
poption is specified, print the call nesting depth and the cumulative instruction count at each call or return. Otherwise, only print when the matching return is hit.
uoption traces user space; if omitted, only traces kernel space. If
toption is specified, it shows the stack trace of the specified thread or a default target thread. Otherwise, it shows the stack trace of the current thread from the frame address specified by a parameter or from the current frame. count is the number of frames to be traced. If the count is omitted, all frames are printed.
Warning: If the target thread's stack is not in the main memory at that
time, the stack trace will fail. User space stack trace is valid only
if the machine dependent code supports it.
ddbdoesn't always recover from touching bad memory. The optional count argument limits the search.
$argxxcan be used to get a parameter passed to the macro. When a macro is called, each argument is evaluated as an expression, and the value is assigned to each parameter,
$arg2, ... respectively. 10
$argvariables are reserved to each level of macros, and they can be used as local variables. The nesting of macro can be allowed up to 5 levels. For example,
macro xinit set $work0 $arg1 macro xlist examine/m $work0,4; set $work0 *($work0) xinit *(xxx_list) xlist ...
will print the contents of a list starting from
xxx_list by each
show all threads[/ul]
ddbprints more information than previous one. It shows UNIX process information like ps for each task. The UNIX process information may not be shown if it is not supported in the machine, or the bottom of the stack of the target task is not in the main memory at that time. It also shows task and thread identification numbers. These numbers can be used to specify a task or a thread symbolically in various commands. The numbers are valid only in the same debugger session. If the execution is resumed again, the numbers may change. The current thread can be distinguished from others by a
#after the thread id instead of
loption, it only shows thread id, thread structure address and the status for each thread. The status consists of 5 letters, R(run), W(wait), S(suspended), O(swapped out) and N(interruptible), and if corresponding status bit is off,
.is printed instead. If
loption is specified, more detail information is printed for each thread.
show task [addr
show thread [addr
show registers[/tu [thread
toption and thread parameter. If
uoption is specified, it displays user registers instead of kernel or currently saved one.
Warning: The support of
u option depends on the
machine. If not supported, incorrect information will be displayed.
vm_pagestructure at addr.
ipc_portstructure at addr.
show ipc_port[/t [thread
ipc_portstructure's addresses the target thread has. The target thread is a current thread or that specified by a parameter.
show macro [name
Toption, addr is assumed to be a kernel address. If you want to set a watch point in user space, specify
Tand task parameter where the address belongs to. If the task parameter is omitted, a task of the default target thread or a current task is assumed. If you specify a wrong space address, the request is rejected with an error message.
Warning: Attempts to watch wired kernel memory may cause unrecoverable error in some systems such as i386. Watchpoints on user addresses work best.