This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: RFC: File transfer commands
On Mon, Oct 29, 2007 at 09:29:41PM +0100, Ulrich Weigand wrote:
> Hmm, I'd have chosen to use a new target object (TARGET_OBJECT_FILE)
> and corresponding qXfer packet; the "annex" would obviously be the
> remote file name.
>
> However, that would not support unlink, and it would cause the
> target to re-open the file for each access. That wouldn't matter
> for my intended use scenario, not sure if it would in yours ...
Yeah, I did think about using qXfer. Having to close and re-open the
file isn't a problem for me either, but that didn't allow for other
useful operations like delete. I haven't implemented any more
operations than you see here, but it would be a reasonable addition
to implement "remote ls" - and the corresponding MI commands, which
might let us use a GUI file browser to select the target program
to execute.
I'd figured on retrieving remote shared libraries from memory, rather
than from the filesystem; we don't need the contents, just the dynamic
symbol table. But that wouldn't take advantage of unstripped
libraries on the target with full symbols, so maybe the file would be
useful too.
--
Daniel Jacobowitz
CodeSourcery