From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4853 invoked by alias); 27 Mar 2002 23:47:20 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 4842 invoked from network); 27 Mar 2002 23:47:16 -0000 Received: from unknown (HELO cygnus.com) (205.180.230.5) by sources.redhat.com with SMTP; 27 Mar 2002 23:47:16 -0000 Received: from reddwarf.cygnus.com (notinuse.cygnus.com [205.180.231.12]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id PAA05161; Wed, 27 Mar 2002 15:47:15 -0800 (PST) Received: (from msnyder@localhost) by reddwarf.cygnus.com (8.11.2/8.11.2) id g2RNaPv18951; Wed, 27 Mar 2002 15:36:25 -0800 Date: Wed, 27 Mar 2002 15:47:00 -0000 From: Michael Snyder Message-Id: <200203272336.g2RNaPv18951@reddwarf.cygnus.com> To: gdb-patches@sources.redhat.com Subject: Document dump/restore commands Cc: cagney@redhat.com X-SW-Source: 2002-03/txt/msg00558.txt.bz2 OK, how's this? 2002-03-27 Michael Snyder * gdb.texinfo: Document new commands dump, append, and restore. * NEWS: Note new commands. Index: NEWS =================================================================== RCS file: /cvs/src/src/gdb/NEWS,v retrieving revision 1.59 diff -c -3 -p -r1.59 NEWS *** NEWS 2002/03/05 22:57:57 1.59 --- NEWS 2002/03/27 23:42:41 *************** *** 3,8 **** --- 3,13 ---- *** Changes since GDB 5.2: + * New commands "dump", "append", and "restore". + + These commands allow data to be copied from target memory + to a bfd-format or binary file (dump and append), and back + from a file into memory (restore). *** Changes in GDB 5.2: Index: doc/gdb.texinfo =================================================================== RCS file: /cvs/src/src/gdb/doc/gdb.texinfo,v retrieving revision 1.93 diff -c -3 -p -r1.93 gdb.texinfo *** gdb.texinfo 2002/03/19 02:49:51 1.93 --- gdb.texinfo 2002/03/27 23:42:42 *************** Table}. *** 4404,4409 **** --- 4404,4410 ---- * Registers:: Registers * Floating Point Hardware:: Floating point hardware * Memory Region Attributes:: Memory region attributes + * Dump/Restore Files:: Copy between memory and a file @end menu @node Expressions *************** the ARM and x86 machines. *** 5567,5573 **** @end table @node Memory Region Attributes ! @section Memory Region Attributes @cindex memory region attributes @dfn{Memory region attributes} allow you to describe special handling --- 5568,5574 ---- @end table @node Memory Region Attributes ! @section Memory region attributes @cindex memory region attributes @dfn{Memory region attributes} allow you to describe special handling *************** Disable @value{GDBN} from caching target *** 5696,5701 **** --- 5697,5777 ---- @c @item verify @c @item noverify (default) @c @end table + + @node Dump/Restore Files + @section Copy between memory and a file + @cindex dump/restore files + @cindex append data to a file + @cindex dump data to a file + @cindex restore data from a file + @kindex dump + @kindex append + @kindex restore + + The commands @code{dump}, @code{append}, and @code{restore} are used + for copying data between target memory and a file. Data is written + into a file using @code{dump} or @code{append}, and restored from a + file into memory by using @code{restore}. Files may be binary, srec, + intel hex, or tekhex (but only binary files can be appended). + + @table @code + @kindex dump binary + @kindex append binary + @item dump binary memory @var{filename} @var{start_addr} @var{end_addr} + Dump contents of memory from @var{start_addr} to @var{end_addr} into + raw binary format file @var{filename}. + + @item append binary memory @var{filename} @var{start_addr} @var{end_addr} + Append contents of memory from @var{start_addr} to @var{end_addr} to + raw binary format file @var{filename}. + + @item dump binary value @var{filename} @var{expression} + Dump value of @var{expression} into raw binary format file @var{filename}. + + @item append binary memory @var{filename} @var{expression} + Append value of @var{expression} to raw binary format file @var{filename}. + + @kindex dump ihex + @item dump ihex memory @var{filename} @var{start_addr} @var{end_addr} + Dump contents of memory from @var{start_addr} to @var{end_addr} into + intel hex format file @var{filename}. + + @item dump ihex value @var{filename} @var{expression} + Dump value of @var{expression} into intel hex format file @var{filename}. + + @kindex dump srec + @item dump srec memory @var{filename} @var{start_addr} @var{end_addr} + Dump contents of memory from @var{start_addr} to @var{end_addr} into + srec format file @var{filename}. + + @item dump srec value @var{filename} @var{expression} + Dump value of @var{expression} into srec format file @var{filename}. + + @kindex dump tekhex + @item dump tekhex memory @var{filename} @var{start_addr} @var{end_addr} + Dump contents of memory from @var{start_addr} to @var{end_addr} into + tekhex format file @var{filename}. + + @item dump tekhex value @var{filename} @var{expression} + Dump value of @var{expression} into tekhex format file @var{filename}. + + @item restore @var{filename} @var{[binary]} @var{bias} @var{start} @var{end} + Restore the contents of file @var{filename} into memory. The @code{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 + @var{binary} after the filename. + + If @var{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 @var{bias}. Other bfd files have + a built-in location; they will be restored at @var{location + bias}. + + If @var{start} and/or @var{end} are non-zero, then only data between + file offset @var{start} and file offset @var{end} will be restored. + These offsets are relative to the addresses in the file, before + the @var{bias} argument is applied. + + @end table @node Tracepoints @chapter Tracepoints