From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22193 invoked by alias); 17 Nov 2003 15:42:10 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 22129 invoked from network); 17 Nov 2003 15:42:09 -0000 Received: from unknown (HELO localhost.redhat.com) (207.219.125.105) by sources.redhat.com with SMTP; 17 Nov 2003 15:42:09 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 5EEB82B8F; Mon, 17 Nov 2003 10:42:05 -0500 (EST) Message-ID: <3FB8EC4D.6050607@redhat.com> Date: Mon, 17 Nov 2003 15:42:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.2) Gecko/20030820 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kris Warkentin Cc: "Gdb@Sources.Redhat.Com" Subject: Re: [RFC] upload/download command References: <03e601c3ad1e$3b2f0ff0$0202040a@catdog> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-11/txt/msg00126.txt.bz2 > Our QNX pdebug protocol supports an upload/download command. This is handy > for putting binaries onto target system and getting back things like > corefiles. Andrew had wanted me to start a discussion on the subject. > > I would like to keep these things in our protocol but it might be useful to > generalize the interface out to core gdb. What I'm thinking is that I > create a general upload/download command that uses a hook into the target's > code for any special functionality. We could have a general one for native > targets which would basically be 'copy' (probably not all that useful but > there for completeness) and just print 'not implemented' for targets which > don't define the hooks. > > Any ideas, comments, suggestions, etc.? Now that there's a generic xfer mechanism in the target vector, I think it is possible to implement this using something like: target_xfer_partial (¤t_target, TARGET_OBJECT_FILE, , , , , ) (but suitably wrapped with target_read_file and target_write_file methods) Andrew