Go to the previous, next section.
This chapter documents the debugging facilities.
These debugging tools were developed initially to aid in development of the kernel and it's modules, but can be applied to virtual machines. The tools available basically only allow the display of memory, code and various processor structures.
The commands defined by the debugger module are:
x addr ...
Displays the value at kernel logical address ADDR. The display is in the following formats:
If more than one address is specified, the contents of each address will be displayed. No checks are done on the addresses to verify their validity.
poke addr value
Sets the double-word at address ADDR to the value VALUE. No checks are performed on the address or the value to verify their validity.
dis [-user] [-16] [-pid pid] [start] [length]
Disassembles the specified block of memory, or continues disassembly after the previous block of memory.
Available options are as follows:
-user
-16
-pid pid
No checks are performed to check that the memory region is valid.
dgdt entry
Displays the contents of the specified selector, where entry >= 0. The information is presented in a textual manner, and to ensure consistency of the data, interrupts are temporarily disables while the selector is being accessed.
No checks are performed to validate the specified value.
dtss addr
Displays the data at the kernel logical address specified in addr in the format of a Task State Segment (TSS).
No checks are performed to validate the specified address.
dr n addr w|rw|x 1|2|4
Sets the i386 debug register n to the linear address specified by addr, with the flags given.
Available flags:
w
rw
x
The numeric flags specify the size of the access in bytes.
d [-u] [-p pid] [start] [length]
Dumps, in a tabular format, a memory region in both hexadecimal and ASCII format. If no address is specified, display continues after the last displayed block. Similarly, if no length is specified, the last specified length is used (defaulting to 128 bytes, which gives 8 lines of display).
Options:
-u
-p pid
Checks are performed to ensure that the entire region of memory that would be displayed are mapped into memory, reporting failure if they are not.
strsrch [-c] [-u] [-p pid] [start] [count] [string]
Searches a memory region for all occurrences of an ASCII string. If no address is specified, display continues after the last displayed block. Similarly, if no length is specified, the last specified length is used. Also, if no string is specified, the last string is used.
Options:
-c
-u
-p pid
Go to the previous, next section.