This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Remote debugging
- From: Ofir Cohen <ofircohenn at gmail dot com>
- To: Russell Shaw <rjshaw at netspace dot net dot au>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Sat, 7 Mar 2015 16:09:26 +0200
- Subject: Re: Remote debugging
- Authentication-results: sourceware.org; auth=none
- References: <54FB02AE dot 60604 at netspace dot net dot au>
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 <host file> <target file>
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 <rjshaw@netspace.net.au> 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?