The following table lists the command syntax for NTSD and KD debugging commands:
NTSD and KD Debugging Commands
Syntax | Meaning |
---|---|
enter | Repeat last command |
| [. | # | * | process-id] | Process status |
~ [. | # | * | ddd] | Thread status |
# pattern address=expression | Search for dissassembly pattern |
? | Display debugger help |
? expression | Compute and display expression |
$< filename | Redirect input from filename |
a [address] | Assemble instruction mnemonics |
~ [[threadspec]] ba [[io]] option size address [[value]] [[cmd-string]] | Set address breakpoint (KD only — not implemented on MIPS or PowerPC) |
bc [[id-list]] | Clear breakpoint(s) |
bd [[id-list]] | Disable breakpoint(s) |
be [[id-list]] | Enable breakpoint(s) |
bl | List breakpoint(s) |
~ [[. | # | ddd | *]] [[threadspec]] bp [[id]] address [[value]] [[command-string]] | Set breakpoints |
c [[ range]] address | Compare |
d [[range]] | Dump memory using previous type |
da [[range]] | Dump memory ASCII |
db [[range]] | Dump memory bytes |
dd [[range]] | Dump memory double-words |
dw [[range]] | Dump memory words |
e address [[list]] | Enter using previous type |
ea address [[list]] | Enter ASCII |
eb address [[list]] | Enter bytes |
ed address [[list]] | Enter double-words |
ew address [[list]] | Enter words |
f range list | Fill range |
~ [[. | # | * | ddd]] f | Freeze thread |
g, gh, and gn | Go commands |
i [[b | w | d]] address | Input from port at address (KD only) |
.inputfile filename | Read from command file |
j expression [[']]command1[[']] ; [[']]command2[[']] | Conditional execution |
~ [[threadspec]] k [[value]] | Backtrace stack |
ln address | Lists first symbols before and after address |
.logappend [[file]] | Append to the current log file |
.logclose | Close the current log file |
.logopen [[file]] | Open a log file |
m range address | Move |
o [[b | w | d]] address value | Output value to port at address (KD only) |
[[. | # | * | ddd]] p [[r]] [[= startaddress]] [[repeat]] | Execute an instruction, then display registers and flags |
~ [[threadspec]] p [[= startaddress]] [[value]] | Trace program instruction or call |
q | Quit |
[[threadspec]] r [[t]] [[register]] [[= [[value]] ]] | Register set (rt toggles full register display — KD only) |
[[threadspec]] rf [[floatregister]] [[= [[value]] ]] | Register set command for floating-point values |
.reboot | Restart target computer (KD only — not implemented on MIPS or PowerPC) |
!reload | Load symbols for all the drivers that have been loaded on the target system. |
s range list | Search range for bytes in list |
ss [[n | a | w]] | Set suffix to n for none, a for ASCII, or w for wide. With no argument, prints current suffix setting. |
sx [[e | d]] [[eventcode | exceptnum]] | Set exceptions (NTSD only) |
s+ | Set source display only |
s& | Set mixed assembler and source display mode |
s – | Set assembler display only |
| [[. | # | process-id]] s | Set process |
~ [[. | # | ddd]] s | Set thread |
t [[r]] [[= startaddress]] [[repeat]] | Trace program instruction |
~ [[. | # | * | ddd]] p [[t]] [[= startaddress]] [[repeat]] | Trace thread |
u [[range]] | Display unassembled instructions |
~ [[. | # | * | ddd]] u | Unfreeze thread |
v range | View source lines |
x symbol | Examine symbol(s) |