Copyright (C) 2000-2012 |
GNU Info (gdb.info)Dump/Restore FilesCopy between memory and a file ============================== The commands `dump', `append', and `restore' are used for copying data between target memory and a file. Data is written into a file using `dump' or `append', and restored from a file into memory by using `restore'. Files may be binary, srec, intel hex, or tekhex (but only binary files can be appended). `dump binary memory FILENAME START_ADDR END_ADDR' Dump contents of memory from START_ADDR to END_ADDR into raw binary format file FILENAME. `append binary memory FILENAME START_ADDR END_ADDR' Append contents of memory from START_ADDR to END_ADDR to raw binary format file FILENAME. `dump binary value FILENAME EXPRESSION' Dump value of EXPRESSION into raw binary format file FILENAME. `append binary memory FILENAME EXPRESSION' Append value of EXPRESSION to raw binary format file FILENAME. `dump ihex memory FILENAME START_ADDR END_ADDR' Dump contents of memory from START_ADDR to END_ADDR into intel hex format file FILENAME. `dump ihex value FILENAME EXPRESSION' Dump value of EXPRESSION into intel hex format file FILENAME. `dump srec memory FILENAME START_ADDR END_ADDR' Dump contents of memory from START_ADDR to END_ADDR into srec format file FILENAME. `dump srec value FILENAME EXPRESSION' Dump value of EXPRESSION into srec format file FILENAME. `dump tekhex memory FILENAME START_ADDR END_ADDR' Dump contents of memory from START_ADDR to END_ADDR into tekhex format file FILENAME. `dump tekhex value FILENAME EXPRESSION' Dump value of EXPRESSION into tekhex format file FILENAME. `restore FILENAME [BINARY] BIAS START END' Restore the contents of file FILENAME into memory. The `restore' command can automatically recognize any known bfd file format, except for raw binary. To restore a raw binary file you must use the optional argument BINARY after the filename. If BIAS is non-zero, its value will be added to the addresses contained in the file. Binary files always start at address zero, so they will be restored at address BIAS. Other bfd files have a built-in location; they will be restored at offset BIAS from that location. If START and/or END are non-zero, then only data between file offset START and file offset END will be restored. These offsets are relative to the addresses in the file, before the BIAS argument is applied. |