This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 0/2] Better handling of slow remote transfers
- From: Gary Benson <gbenson at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: Doug Evans <dje at google dot com>, Jan Kratochvil <jan dot kratochvil at redhat dot com>, gdb-patches <gdb-patches at sourceware dot org>, Sandra Loosemore <sandra at codesourcery dot com>, Pedro Alves <palves at redhat dot com>, André Pönitz <apoenitz at t-online dot de>, Paul Koning <Paul_Koning at dell dot com>
- Date: Wed, 12 Aug 2015 10:48:31 +0100
- Subject: Re: [PATCH 0/2] Better handling of slow remote transfers
- Authentication-results: sourceware.org; auth=none
- References: <001a11c301b0388ac5051d0c5ab8 at google dot com> <20150811185519 dot GA28644 at host1 dot jankratochvil dot net> <CADPb22TM42jGif4PqOgpvDxb7RhzS=vBgGJijcB7h9-3rCbH7A at mail dot gmail dot com> <20150811195943 dot GC22245 at adacore dot com>
Joel Brobecker wrote:
> > At any rate, I think the default behaviour for 7.10
> > has to be the default behaviour of 7.9
> > (given that, for example, we're not going to make file transfer
> > more adequately interruptible for 7.10).
>
> That makes sense to me.
If we are to reset the default sysroot to "" then please consider the
series I posted that added the auto-target-prefix functionality:
https://sourceware.org/ml/gdb-patches/2015-07/msg00828.html
With these patches the "target:" prefix is only enabled if the user
does "target remote" with no sysroot or file specified, a case that
in 7.9 would result in a debug session with no symbols.
This has the following matrix of behaviours:
* User wants to supply the file and not have libraries fetched
(Sandra Loosemore's use case):
bash$ gdb
(gdb) file ./a.out
(gdb) target remote :9999
and:
bash$ gdb ./a.out
(gdb) target remote :9999
7.9 -> no files transferred
7.10 -> no files transferred
* User wants to specify a file AND have GDB pull libraries from
the remote:
bash$ gdb
(gdb) file ./a.out
(gdb) set sysroot remote:
(gdb) target remote :9999
and:
bash$ gdb ./a.out
(gdb) set sysroot remote:
(gdb) target remote :9999
7.9 -> libraries transferred, executable read locally
7.10 -> libraries transferred, executable read locally
* User wants to connect to remote target and have GDB do the work:
bash$ gdb
(gdb) target remote :9999
7.9 -> no files transferred, debug session with no symbols
7.10 -> all files transferred, debug session with symbols
If the user actually wants to debug with no symbols at all they can
do this:
bash$ gdb
(gdb) set auto-target-prefix off
(gdb) target remote :9999
With this series all 7.9 use cases are supported, and only the use
case where the user wants no symbols requires extra typing. Most
users are going to want symbols, and any user capable of debugging
without symbols is capable of adding a line to their .gdbinit.
Thanks,
Gary
--
http://gbenson.net/