From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9700 invoked by alias); 29 Jun 2011 17:29:39 -0000 Received: (qmail 9415 invoked by uid 22791); 29 Jun 2011 17:29:38 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from va3ehsobe001.messaging.microsoft.com (HELO VA3EHSOBE001.bigfish.com) (216.32.180.11) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 29 Jun 2011 17:29:24 +0000 Received: from mail41-va3-R.bigfish.com (10.7.14.249) by VA3EHSOBE001.bigfish.com (10.7.40.21) with Microsoft SMTP Server id 14.1.225.22; Wed, 29 Jun 2011 17:29:23 +0000 Received: from mail41-va3 (localhost.localdomain [127.0.0.1]) by mail41-va3-R.bigfish.com (Postfix) with ESMTP id 0B53619D82CE; Wed, 29 Jun 2011 17:29:23 +0000 (UTC) X-SpamScore: -17 X-BigFish: VPS-17(zzbb2dK9371M1432N98dKzz1202hzzz2dh2a8h668h839h) X-Forefront-Antispam-Report: CIP:137.71.25.55;KIP:(null);UIP:(null);IPVD:NLI;H:nwd2mta1.analog.com;RD:nwd2mail10.analog.com;EFVD:NLI Received: from mail41-va3 (localhost.localdomain [127.0.0.1]) by mail41-va3 (MessageSwitch) id 1309368541981963_19303; Wed, 29 Jun 2011 17:29:01 +0000 (UTC) Received: from VA3EHSMHS023.bigfish.com (unknown [10.7.14.251]) by mail41-va3.bigfish.com (Postfix) with ESMTP id D63671C5007E; Wed, 29 Jun 2011 17:26:15 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by VA3EHSMHS023.bigfish.com (10.7.99.33) with Microsoft SMTP Server (TLS) id 14.1.225.22; Wed, 29 Jun 2011 17:26:12 +0000 Received: from NWD2HUBCAS1.ad.analog.com (nwd2hubcas1.ad.analog.com [10.64.73.29]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id p5THP5xu014460 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Wed, 29 Jun 2011 13:25:05 -0400 Received: from [10.69.2.122] (10.69.2.122) by NWD2HUBCAS1.ad.analog.com (10.64.73.29) with Microsoft SMTP Server id 8.1.358.0; Wed, 29 Jun 2011 13:25:45 -0400 Message-ID: <4E0B6078.8080301@analog.com> Date: Wed, 29 Jun 2011 17:29:00 -0000 From: Jie Zhang User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110522 Icedove/3.1.10 MIME-Version: 1.0 To: Joel Brobecker CC: Mike Frysinger , "gdb-patches@sourceware.org" , "toolchain-devel@blackfin.uclinux.org" Subject: Re: [PATCH v2] gdb: tests: set remotetimeout to gdb_load_timeout for remote targets References: <1307309678-10966-1-git-send-email-vapier@gentoo.org> <1308510312-5512-1-git-send-email-vapier@gentoo.org> <20110629162527.GC2407@adacore.com> In-Reply-To: <20110629162527.GC2407@adacore.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-OriginatorOrg: analog.com 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: 2011-06/txt/msg00459.txt.bz2 On 06/29/2011 12:25 PM, Joel Brobecker wrote: >> Rather than relying on the default remotetimeout value (which might be >> too small for some slower devices), use the existing gdb_load_timeout >> config option to set it. > > No one seems to be comfortable looking at this, so I took a look. > I think the idea makes sense. > Thank you! I can only answer the following question and will leave others to Mike. >> + if [is_remote target] { >> + set oldremotetimeout [get_remotetimeout] >> + set_remotetimeout $loadtimeout >> + } > > Is there a specific reason you already know about that made you > change the remotetimeout only when the target is remote? If there is, > I think it'd be nice to add a comment to that effect. If it's just > because we don't expect the timeout to have any effect in the non- > remote case, then I guess we can leave it like that. But I'm not > to certain about that. I would consider the idea of making things > simpler by just setting the timeout everytime, since this part of > the code will always result in a "load" command being used. > I think it makes no sense to change remotetimeout for non-remote case so I added that conditional. I would like to leave it like that since I think the code looks clearer in this way. If we take it away, the code is simpler, but someone looking at the code might wonder why set remotetimeout for non-remote target. Regards, Jie