HP gnu source-level debugger 5992-4701 manual Word-format Word-sizenr-rowsnr-cols aschar

Models: gnu source-level debugger 5992-4701

1 369
Download 369 pages 58.54 Kb
Page 326
Image 326

'word-format'

'word-size''nr-rows''nr-cols' 'aschar'

The format to be used to print the memory words. The notation is the same as for GDB print command (see“Output formats” (page 86)).

The size of each memory word in bytes.

The number of rows in the output table.

The number of columns in the output table.

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-rowsby nr-colswords, each word being word-sizebytes. 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 9^done,addr="0x00001390",nr-bytes="6",total-bytes="6", next-row="0x00001396",prev-row="0x0000138e",next-page="0x00001396", prev-page="0x0000138a",memory=[ {addr="0x00001390",data=["0x00","0x01"]}, {addr="0x00001392",data=["0x02","0x03"]}, {addr="0x00001394",data=["0x04","0x05"]}]

(gdb)

Read two bytes of memory starting at address shorts + 64 and display as a single word formatted in decimal.

(gdb)

5-data-read-memory shorts+64 d 2 1 1 5^done,addr="0x00001510",nr-bytes="2",total-bytes="2",

326 The GDB/MI Interface

Page 326
Image 326
HP gnu source-level debugger 5992-4701 manual Word-format Word-sizenr-rowsnr-cols aschar