This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: auto-retry TCP connections for "target remote"
> That's where it was suggested to me that I put it. I'm actually pretty
> confused by the organization of the remote configuration commands; some of
> them are "set remote foo", while others are "set remotebar", and there's
> also "set serial" documented as being for "serial/parallel port
> configuration". If there's a plan to all this, I don't know what it is.
> :-(
Unfortunately, neither do I, because I haven't used the remote target
much in the past.
> >I wonder if it wouldn't be both simpler and more general to do everything
> >at the remote.c level.Something like replacing the call to serial_open ()
> >by a loop that calls serial_open a few times until we either succeed or
> >exceed the number of retries. What do others think?
> >
> >>+set remote auto-retry (on|off)
> >>+show remote auto-retry
> >
> >Rather than having an on-off setting, can we have a setting that
> >allows us to configure the maximum number of retries. If set to zero,
> >then it's equivalent to "auto-retry off".
>
> I'm willing to try to re-work the patch if there's agreement this would be
> a better approach. My main concern is that there are some kinds of
> connection failures that really ought to be treated as immediately and
> permanently fatal; for instance, if the process launched by "target remote
> |" fails to start (because the command line was given incorrectly, etc), or
> the named serial device doesn't exist or has permission problems. Maybe
> serial_open ought to explicitly set a status code to indicate a retry-able
> failure, with the default that failures are fatal?
Sounds like a good idea to me.
--
Joel