From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 110082 invoked by alias); 7 Mar 2015 14:09:31 -0000 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 Received: (qmail 110071 invoked by uid 89); 7 Mar 2015 14:09:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-wi0-f170.google.com Received: from mail-wi0-f170.google.com (HELO mail-wi0-f170.google.com) (209.85.212.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sat, 07 Mar 2015 14:09:29 +0000 Received: by wiwl15 with SMTP id l15so9146832wiw.1 for ; Sat, 07 Mar 2015 06:09:26 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.194.75.193 with SMTP id e1mr38844218wjw.126.1425737366247; Sat, 07 Mar 2015 06:09:26 -0800 (PST) Received: by 10.194.210.104 with HTTP; Sat, 7 Mar 2015 06:09:26 -0800 (PST) In-Reply-To: <54FB02AE.60604@netspace.net.au> References: <54FB02AE.60604@netspace.net.au> Date: Sat, 07 Mar 2015 14:09:00 -0000 Message-ID: Subject: Re: Remote debugging From: Ofir Cohen To: Russell Shaw Cc: "gdb@sourceware.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00006.txt.bz2 Hi Russel, I hope this is what you're looking for. I see two approaches: 1) File system sharing/copying utility Similar to what you suggested, NFS, scp, etc. I do remote debugging all the time with gdb and gdbserver, and I have this batch file (both my host and target are Windows OSes) that copies my binaries over SMB share. If you build your sources frequently, and you're paranoid about typing the same commands over and over again, how about adding a post-build command to call this script to deploy the files? 2) Transferring files via remote protocol Once you're connected from gdb to gdbserver, you can use the following command [1]: remote put However, this might be an overkill as it will require gdbserver [2] to be attached to some dummy process, and will most likely require you to start new gdb and gdbserver processes in order to debug the new binary. I personally consider option #1 as a valid and normal way of host2target remote debugging workflow. - Ofir [1] https://sourceware.org/gdb/onlinedocs/gdb/File-Transfer.html [2] https://ftp.gnu.org/old-gnu/Manuals/gdb-5.1.1/html_node/gdb_130.html On 7 March 2015 at 15:52, Russell Shaw wrote: > Hi, > I'm trying to set up running gdbserver on a laptop and ddd/gdb on a desktop > pc. > > Apart from exporting an NFS directory from the laptop, what other easy way > is there to get the compiled binary debugee automatically transferred from > the desktop to the laptop?