A copy/save command ...

Andrew Cagney ac131313@cygnus.com
Thu Jan 3 01:02:00 GMT 2002


Hello,

To toss out an idea.  One of those oft mentioned missing features is a 
command to read/write binary data to/from GDB's target memory.  There is 
the load command, but that works on object files (readable via BFD).

Anyway, I've two vague thoughts on the syntax/semantics:

1. (gdb) copy <expression> <file>

The result of <expression> is written to the raw file.  This expoits the 
fact that GDB stores an expression in target form in host memory. 
Consequently, the copy command just writes that raw data to the file.


2. (gdb) copy <address> <length> <file>
or (gdb) copy/<length> <address> <file>

or similar.  A more traditional <address>/<length> approach. 
``copy/<length>'' comes from ``x/<length>''.


better suggestions welcome.

enjoy,
Andrew



More information about the Gdb mailing list