Saves the contents of memory locations to a binary file or a text file containing hexadecimal values.
Syntax
save -h|-b [<ms>:]<addr>... <filename> [-a|-o] [8bit|16bit|32bit|64bit]
-h|-b
Sets the output file format to hex or binary. For hex format, the address is also saved so that the contents can easily be restored with the restore command.
[<ms>:]<addr>
Address to read from. For architectures with multiple memory spaces, a memory space id may be specified.
-a
Append specifier. Instructs the command-line debugger to append the saved memory contents to the current contents of the specified file.
-o
Overwrite specifier. Tells the debugger to overwrite any existing contents of the specified file.
8bit|16bit|32bit|64bit
Controls the memory access size.
The following table lists and defines examples of the save command.
| Command | Description |
|---|---|
| set addressBlock1 "p:10..`31" set addressBlock2 "p:10000#20" save -h $addressBlock1 $addressBlock2 hexfile.txt -a | Dumps contents of two memory blocks to the text file hexfile.txt (in append mode). |
| set addressBlock1 "p:10..`31" set addressBlock2 "p:10000#20" save -b $addressBlock1 $addressBlock2 binfile.bin -o | Dumps contents of two memory blocks to the binary file binfile.bin (in overwrite mode). |