From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23144 invoked by alias); 29 Oct 2007 20:29:49 -0000 Received: (qmail 23135 invoked by uid 22791); 29 Oct 2007 20:29:49 -0000 X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.29.155) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 29 Oct 2007 20:29:45 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.13.8/8.13.8) with ESMTP id l9TKTgND324896 for ; Mon, 29 Oct 2007 20:29:42 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v8.5) with ESMTP id l9TKTgJR2203854 for ; Mon, 29 Oct 2007 21:29:42 +0100 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l9TKTf9n009989 for ; Mon, 29 Oct 2007 21:29:42 +0100 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id l9TKTfow009984; Mon, 29 Oct 2007 21:29:41 +0100 Message-Id: <200710292029.l9TKTfow009984@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 29 Oct 2007 21:29:41 +0100 Subject: Re: RFC: File transfer commands To: drow@false.org (Daniel Jacobowitz) Date: Mon, 29 Oct 2007 20:29:00 -0000 From: "Ulrich Weigand" Cc: gdb@sourceware.org In-Reply-To: <20071029195510.GA18673@caradoc.them.org> from "Daniel Jacobowitz" at Oct 29, 2007 03:55:10 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00288.txt.bz2 Daniel Jacobowitz wrote: > Two years ago, I worked on a GDB port to SymbianOS. The SymbianOS > target was interesting in a couple of ways that required changes to > GDB. One was the target shared library list, which is included in > GDB 6.7. Another was the need to specify a running process to attach > to over a remote connection, which I'll be posting about in a few days > or a week. And a third way was the need for file transfer commands. That's interesting, as remote file transfer is on my current to-do list ;-) I'd like to remove the requirement to have exact copies of target shared libraries available on the host system when doing remote debugging via gdbserver; this is an annoyingly frequent cause of user complaints ... To fix this, I'm thinking of extending the shared library layer to directly access the shared library files available on the target instead of searching for copies on the host. This would use some sort of file access via the remote protocol. > Here is the documentation I've written for it. There are three new > CLI commands (remote put, remote get, remote delete); three new MI > commands (-target-file-put, -target-file-get, -target-file-delete); > and five new remote protocol packets (vFile:open, vFile:close, > vFile:pread, vFile:pwrite, vFile:unlink). I'm not committed to any > of the command names or packets; alternatives welcome. > > Should GDB have this feature? Are these the right commands for it? 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 ... Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com