From 16d9dec6876494d5b8d749167e428cd366716ac8 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Fri, 29 Mar 2002 01:19:37 +0000 Subject: [PATCH] 2002-03-27 Michael Snyder * gdb.texinfo: Document new commands dump, append, and restore. --- gdb/doc/ChangeLog | 4 +++ gdb/doc/gdb.texinfo | 79 ++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 82 insertions(+), 1 deletion(-) diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog index 1d23b99fb74..49230e53d69 100644 --- a/gdb/doc/ChangeLog +++ b/gdb/doc/ChangeLog @@ -1,3 +1,7 @@ +2002-03-27 Michael Snyder + + * gdb.texinfo: Document new commands dump, append, and restore. + 2002-03-27 Andrew Cagney * gdbint.texinfo (Releasing GDB): Revise the section `Before the diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index 147bdd108b0..eda5ee3a34e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -4404,6 +4404,7 @@ Table}. * 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 @@ -5567,7 +5568,7 @@ the ARM and x86 machines. @end table @node Memory Region Attributes -@section Memory Region Attributes +@section Memory region attributes @cindex memory region attributes @dfn{Memory region attributes} allow you to describe special handling @@ -5697,6 +5698,82 @@ Disable @value{GDBN} from caching target memory. This is the default. @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 offset @var{bias} +from that location. + +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 @c This chapter is based on the documentation written by Michael -- 2.30.2