This is the mail archive of the
mailing list for the GDB project.
Re: A copy/save command ...
- From: Daniel Jacobowitz <drow at mvista dot com>
- To: Andrew Cagney <ac131313 at cygnus dot com>
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 3 Jan 2002 15:58:01 -0500
- Subject: Re: A copy/save command ...
- References: <3C341E2D.firstname.lastname@example.org>
On Thu, Jan 03, 2002 at 04:02:37AM -0500, Andrew Cagney wrote:
> 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.
Perhaps not the best name - we want to be able to both read and write,
and it's not clear which way copy goes. I don't want to end up doing
magic thinking that ``this looks like an address, not a filename'' to
figure that out.
Perhaps read/write? But that's still not clear which way is which.
load/store would be perfect but load is already used.
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer