d [-bhwds] [-r reg] addr [cnt]
|-b||display data as 8 bit bytes|
|-h||display data as 16 bit words|
|-w||display data as 32 bit words|
|-d||display data as 64 bit words (not available on all targets)|
|-s||display data as a NULL terminated string|
|-r reg||display data as a register|
|addr||start displaying from address addr|
|cnt||display cnt items|
The d command is used to examine memory. The command prints the memory contents starting at the address given by the addr command argument. The output is formatted according to the options given to the command and to the setting of certain environment variables. The -b, -h, -w and on 64 bit capable targets -d switch, determines wether the data should be displayed as byte, halfword, word or double word entities. The -s switch can be used to display the memory data as a NULL terminated string. The string is limited to maximum 70 characters to avoid overruns.
If no size switch is given, the d command determines the size to display from the environment variable datasize.
On targets that support field printing of register values the -r reg swicth may be used to print the memory value as if it was a register contents value of the type of the register specified.
The output is sent through 'more' and quitting more terminates the command. The cnt argument can be used to display cnt number of lines and then stop. When the cnt argument is given the output is not sent through 'more' but all lines are output until all lines have been printed.
The output is divided in three fields. First the address is printed and then the memory contents in hexadecimal. The last field shows the memory contents as printable characters. If the memory contents can not be represented by a printable character it is output as a dot (.).
The following example displays memory starting at 0xa0010000.
PMON> d -w a0010000
a0010000 bfc0 2b00 bfc0 2b00 bfc0 2b00 bfc0 2b60 ..+...+...+...+`
a0010010 bfc0 2b20 bfc0 2ba8 bfc0 2b78 bfc0 2b60 ..+...+...+x..+`
a0010020 bfc0 2b48 bfc0 2ba8 bfc0 2ba8 bfc0 2ba8 ..+H..+...+...+.
a0010030 bfc0 2b78 bfc0 2b60 bfc0 2b48 bfc0 2e78 ..+x..+`..+H...x
a0010040 bfc0 2f08 bfc0 2ec4 bfc0 2e80 bfc0 2f90 ../.........../.
a0010050 bfc0 2f90 bfc0 2f90 bfc0 2e78 bfc0 2e78 ../.../....x...x
a0010060 bfc0 2e78 0000 0000 0000 0000 0000 0000 ...x............
The command uses the datasize environment variable.