Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Sandra Loosemore <sandra@codesourcery.com>
To: Joel Brobecker <brobecker@adacore.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: auto-retry TCP connections for "target remote"
Date: Sun, 28 Dec 2008 17:51:00 -0000	[thread overview]
Message-ID: <4957BC4F.6000406@codesourcery.com> (raw)
In-Reply-To: <20081228110831.GB4216@adacore.com>

Joel Brobecker wrote:

> I'm just wondering why you chose to implement the idea inside ser-tcp?

In large part because I'm not very familiar with GDB internals, and this is 
where what I was trying to do was failing.  :-P

> Especially since the name of the associated settings "remote auto-retry"
> and "remote connect-timeout" does not suggest that it is specific to
> a particular transport protocol.

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.  :-(

> 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?

-Sandra


  reply	other threads:[~2008-12-28 17:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-26 20:20 Sandra Loosemore
2008-12-26 20:58 ` Eli Zaretskii
2008-12-28 11:09 ` Joel Brobecker
2008-12-28 17:51   ` Sandra Loosemore [this message]
2008-12-29  3:26     ` Joel Brobecker
2008-12-29  3:55   ` Daniel Jacobowitz
2008-12-29  4:38     ` Joel Brobecker
2008-12-29 13:49       ` Daniel Jacobowitz
2008-12-29 14:13         ` Joel Brobecker
2008-12-29 14:57           ` Sandra Loosemore
2008-12-29 19:31             ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4957BC4F.6000406@codesourcery.com \
    --to=sandra@codesourcery.com \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox