From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8829 invoked by alias); 28 Dec 2008 17:51:30 -0000 Received: (qmail 8820 invoked by uid 22791); 28 Dec 2008 17:51:29 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 28 Dec 2008 17:50:54 +0000 Received: (qmail 17236 invoked from network); 28 Dec 2008 17:50:52 -0000 Received: from unknown (HELO bullfrog.localdomain) (sandra@127.0.0.2) by mail.codesourcery.com with ESMTPA; 28 Dec 2008 17:50:52 -0000 Message-ID: <4957BC4F.6000406@codesourcery.com> Date: Sun, 28 Dec 2008 17:51:00 -0000 From: Sandra Loosemore User-Agent: Thunderbird 2.0.0.4 (X11/20070604) MIME-Version: 1.0 To: Joel Brobecker CC: gdb-patches@sourceware.org Subject: Re: RFA: auto-retry TCP connections for "target remote" References: <49553C3A.2070000@codesourcery.com> <20081228110831.GB4216@adacore.com> In-Reply-To: <20081228110831.GB4216@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00423.txt.bz2 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