From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14980 invoked by alias); 29 Dec 2008 03:26:23 -0000 Received: (qmail 14972 invoked by uid 22791); 29 Dec 2008 03:26:22 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 29 Dec 2008 03:25:47 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id E16FE2A963B; Sun, 28 Dec 2008 22:25:45 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id jChCDlgxWUPg; Sun, 28 Dec 2008 22:25:45 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 18B572A9633; Sun, 28 Dec 2008 22:25:45 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id B1692E7ACD; Mon, 29 Dec 2008 07:25:37 +0400 (RET) Date: Mon, 29 Dec 2008 03:26:00 -0000 From: Joel Brobecker To: Sandra Loosemore Cc: gdb-patches@sourceware.org Subject: Re: RFA: auto-retry TCP connections for "target remote" Message-ID: <20081229032537.GE4216@adacore.com> References: <49553C3A.2070000@codesourcery.com> <20081228110831.GB4216@adacore.com> <4957BC4F.6000406@codesourcery.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4957BC4F.6000406@codesourcery.com> User-Agent: Mutt/1.4.2.2i 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/msg00432.txt.bz2 > 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