Debugging with GDB Manual (5900-1473; WDB 6.2; January 2011)

Table Of Contents
The -data-read-memory command
Synopsis
-data-read-memory [ -o byte-offset ]
address word-format word-size
nr-rows nr-cols [ aschar ]
where:
'address' An expression specifying the address of the first memory word to
be read. Complex expressions containing embedded white space
should be quoted using the C convention.
'word-format' The format to be used to print the memory words. The notation is
the same as for GDB print command (see“Output formats
(page 79)).
'word-size' The size of each memory word in bytes.
'nr-rows' The number of rows in the output table.
'nr-cols' The number of columns in the output table.
'aschar' If present, indicates that each row should include an ASCII dump.
The value of aschar is used as a padding character when a byte
is not a member of the printable ASCII character set (printable
ASCII characters are those whose code is between 32 and 126,
inclusively).
'byte-offset' An offset to add to the address before fetching memory.
This command displays memory contents as a table of nr-rows by nr-cols words,
each word being word-size bytes. In total, nr-rows * nr-cols * word-size
bytes are read (returned as 'total-bytes'). Should less than the requested number
of bytes be returned by the target, the missing words are identified using 'N/A'. The
number of bytes read from the target is returned in 'nr-bytes' and the starting address
used to read memory in 'addr'.
The address of the next/previous row or page is available in 'next-row' and
'prev-row', 'next-page' and 'prev-page'.
GDB command
The corresponding GDB command is 'x'. gdbtk has 'gdb_get_mem' memory read
command.
Example
Read six bytes of memory starting at bytes+6 but then offset by -6 bytes. Format as
three rows of two columns. One byte per word. Display each word in hex.
(gdb)
9-data-read-memory -o -6 -- bytes+6 x 1 3 2
21.6 GDB/MI Data manipulation 325