Format
address, address/[mode]
address/[count][mode]
[b| Bd | Bf | Bq | c | d | D | f | g | h | i | I | ld | lo | lx | o | O | q | s | S | o | W | X] [>file]
Description
The
display memory subcommand displays the contents of
memory. The display starts at the first address, and terminates at
either the second address or until count items are printed. If the
address is ".", the address following the one most recently printed
is used. The mode specifies how memory is to be printed; if it is
omitted the previous mode specified is used. The initial mode is "X".
- •
- The range of memory displayed is controlled by specifying:
- –-
- Two address arguments, in which case all lines between
those two addresses are displayed (address/address),
or
- –-
- One address argument, where the display starts, and count,
which determines the number of lines displayed from address (address/count).
- .
- Used in place of the first address argument, this displays
from the point where you left off (see example 3).
- •
- Symbolic addresses are specified by preceding the name with
an & (ampersand).
- •
- Registers are denoted by "$rN", "$frN" or "$drN", where N is
the number of the register.
- •
- Addresses may be expressions made up of other addresses and
the operators +, -, and * indirection.
- •
- Any expression enclosed in parentheses is interpreted as an
address.
- •
- The format in which the memory is displayed is controlled by
the mode argument. The default for the mode argument
is the current mode. The initial value of mode is X.
The possible modes include:
- b
- Print a byte in octal format
- Bf
- Print single precision real number in binary floating point
- Bg
- Print a double precision real number in binary floating point
- Bq
- Print a long double precision real number in binary floating
point
- c
- Print a byte as a character
- C
- Print a wchar_t character
- d
- Print a short word in decimal
- D
- Print a long word in decimal
- Df
- Print single precision real number in decimal floating point
- Dg
- Print a double precision real number in decimal floating point
- Dq
- Print a long double precision real number in decimal floating
point
- f
- Print a single precision real number in hexadecimal floating
point
- g
- Print a double precision real number in hexadecimal floating
point
- h
- Print a byte in hexadecimal format
- ha
- Print a byte in hexadecimal format and ASCII
- he
- Print a byte in hexadecimal format and EBCDIC
- i
- Print the machine instruction
- I
- Print a wint_t character
- ld
- Print a long long in signed decimal
- lo
- Print a long long in octal format
- lu
- Print a long long in unsigned decimal
- lx
- Print a long long in hexadecimal format
- o
- Print a short word in octal format
- O
- Print a long word in octal format
- q
- Print a long double precision real number in hexadecimal floating
point
- s
- Print a string (terminated by a null byte)
- S
- Print a wchar_t string
- W
- Print a wint_t string
- x
- Print a short word in hexadecimal format
- X
- Print a long word in hexadecimal format
Options
- >file
- Redirects output to the specified file.
Usage notes
The display memory subcommand can be run only while the dbx debug
program is running.
Examples
- To display one long word of memory content in hexadecimal format
starting at the address 0X3FFFE460, enter:
0x3fffe460 / x
- To display 2 bytes of memory content as characters starting at
the address of variable y, enter:
&y/2c
- To display from the point where you left off, when using . (period)
in place of one of the addresses, enter:
0x100 / 2 which displays 2 words starting at x'100'
followed
by:
. / 3 which displays 3 words starting at x'108'
Related information
See also: cleari, gotoi, registers, stepi, nexti, tracei,
and stopi commands.