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: Pedro Alves <palves at redhat dot com>
- Cc: Joel Brobecker <brobecker at adacore dot com>, 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>, André Pönitz <apoenitz at t-online dot de>, Paul Koning <Paul_Koning at dell dot com>
- Date: Wed, 12 Aug 2015 11:38: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> <20150812094831 dot GD11096 at blade dot nx> <55CB1B8D dot 6010501 at redhat dot com>
Pedro Alves wrote:
> On 08/12/2015 10:48 AM, Gary Benson wrote:
> > 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
>
> I'd really prefer not adding magic at the last minute to the 7.10
> release. That would leave no breathing space to sort out further
> design mistakes, which I'm sure we'll trip on.
The only real "magic" that series adds is this:
+ if (target_filesystem_is_local ())
...
+ else if (auto_target_prefix && *gdb_sysroot == '\0')
+ {
+ /* Set the absolute prefix to "target:" for executable files
+ and for shared libraries whose executable filename has a
+ "target:"-prefix. */
+ if (!is_solib
+ || (exec_filename != NULL
+ && is_target_filename (exec_filename)))
+ {
+ sysroot = xstrdup (TARGET_FILENAME_PREFIX);
+ make_cleanup (xfree, sysroot);
+ }
+ }
*If* it proves to be a problem then we can deprecate the set/show
auto-target-prefix boolean.
It seems like you're saying this series is a big change, but it's
really not: the core of it is that little snippet of logic, which
is easy enough to reason about:
IF target filesystem is remote
AND auto_target_prefix is enabled
AND no sysroot is set
AND (we're looking for an executable
OR we're looking for a solib loaded by a target-prefixed executable):
Prefix the filename with "target:"
It's certainly way less invasive a change than making transfers
interruptible would be.
> I think we need to unblock 7.10 as soon as possible so that 7.11
> with all the neat sysroot features happens sooner too. :-)
Sure, but why not unblock it this way so that 7.10 users can have
the neat sysroot features, *if and only if* they use GDB in a way
that didn't make sense in 7.9?
Thanks,
Gary
--
http://gbenson.net/