From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14814 invoked by alias); 31 Mar 2012 07:29:33 -0000 Received: (qmail 14791 invoked by uid 22791); 31 Mar 2012 07:29:31 -0000 X-SWARE-Spam-Status: No, hits=-6.3 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 31 Mar 2012 07:29:16 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q2V7TG41019746 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sat, 31 Mar 2012 03:29:16 -0400 Received: from host2.jankratochvil.net (ovpn-116-33.ams2.redhat.com [10.36.116.33]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q2V7TCBP003367 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sat, 31 Mar 2012 03:29:15 -0400 Date: Sat, 31 Mar 2012 07:29:00 -0000 From: Jan Kratochvil To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] [RFC] Automatically append 'gdb/testsuite/boards' to DejaGnu's boards dir list. Message-ID: <20120331072912.GA15237@host2.jankratochvil.net> References: <20120331030221.8207.47982.stgit@brno.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120331030221.8207.47982.stgit@brno.lan> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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: 2012-03/txt/msg01081.txt.bz2 On Sat, 31 Mar 2012 05:02:21 +0200, Pedro Alves wrote: > +++ b/gdb/testsuite/append_gdb_boards_dir It should be in testsuite/lib/ , shouldn't it? > +proc append_gdb_boards_dir { name1 name2 op } { > + global srcdir > + global boards_dir > + > + # The "boards/../boards" contortion accounts for the odd chance of > + # someone wanting to point at GDB's boards dir in the global > + # config before some other board dir, in which case we should not > + # push it to the end of the list. > + set gdb_boards_dir "${srcdir}/boards/../boards" > + > + # Keep our board dir last in the list. > + set idx [lsearch $boards_dir "$gdb_boards_dir"] lsearch -exact > + set boards_dir [lreplace $boards_dir $idx $idx] lreplace X -1 -1 seems not to modify X but according to the doc it seems to be undefined. Suggesting one 'if' conditional, ale for the code documentation purposes. > + lappend boards_dir "${gdb_boards_dir}" > +} > +trace add variable "boards_dir" write append_gdb_boards_dir There were some complaints on the list for features not compatible with tcl-8.3, 'trace add' is not listed in tcl-8.3 doc: http://www.tcl.tk/man/tcl8.3/TclCmd/trace.htm Sure a great feature. Thanks, Jan