Chapter Contents

Previous

Next
Command Directory

dump

Dump Memory Contents

ABBREVIATION
du{mp}

FORMATS
Format 1: dump EXPRESSION relative/absolute
Format 2: dump EXPRESSION COUNT relative/absolute
Format 3: dump EXPRESSION relative/absolute str

DESCRIPTION
The dump command dumps the contents of storage pointed to by EXPRESSION. Note that for the dump command, EXPRESSION is either a pointer, an address, or an array.

Format 1: Format 1 dumps the contents of storage pointed to by the argument EXPRESSION with the number of bytes dumped determined as shown in Dump Command: Number of Bytes Dumped.

Dump Command: Number of Bytes Dumped
Argument Type Number of Bytes Dumped
pointer the size of the pointed-to expression
address of a scalar or aggregate the size of one item of the array
array the size of one item of the array
absolute address 1 (treated as a pointer to char)

Format 2: Format 2 dumps the contents of storage pointed to by EXPRESSION up to the number of bytes specified by COUNT. COUNT is an integer that specifies the number of bytes to be dumped.

Format 3: Format 3 dumps the contents of storage associated with EXPRESSION until the null terminator \ 0 is encountered.

For all formats, the output of the dump command shows the contents of the EXPRESSION argument in characters and in hexadecimal format and shows the address of the argument as a hexadecimal number. The keyword relative or absolute selects the type of addressing used to display the address. The default is to display relative addresses.

The output of the dump command is affected by the width of the output area. In line mode, the linesize specified by the auto command will affect the width of the output. In full-screen mode, the width of the window in which the dump is displayed affects the width of the output. (Output from the dump command can be displayed in either the Log or Dump window.)

EXAMPLES
The dump command examples are based on the following declarations:
   char *s;
   struct INT2 {int a, b} int2;

dump s
dumps one character of storage pointed to by s .

dump &int2
dumps the 8 bytes (size of structure int2 ) of structure int2 .

dump s 10
dumps 10 bytes of storage beginning at the location pointed to by s .

dump 0p00234567 20
dumps 20 bytes of storage beginning at the absolute address 0p00234567.

dump s str
dumps the string pointed to by s .

SYSTEM DEPENDENCIES
none

COMMAND CAN BE ISSUED FROM

PROFILE no
configuration file no
Source window prefix none

SCOPE
The dump command uses command scope to resolve references to all identifiers.

RETURN CODES SET
Successful: 0
Unsuccessful: 1

SEE ALSO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.