From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23258 invoked by alias); 4 Feb 2010 00:38:52 -0000 Received: (qmail 23249 invoked by uid 22791); 4 Feb 2010 00:38:51 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-2.vmware.com (HELO smtp-outbound-2.vmware.com) (65.115.85.73) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 04 Feb 2010 00:38:12 +0000 Received: from mailhost2.vmware.com (mailhost2.vmware.com [10.16.67.167]) by smtp-outbound-2.vmware.com (Postfix) with ESMTP id 09CFC4E045; Wed, 3 Feb 2010 16:38:10 -0800 (PST) Received: from [10.20.124.101] (promd-2s-dhcp101.eng.vmware.com [10.20.124.101]) by mailhost2.vmware.com (Postfix) with ESMTP id F3F048EC49; Wed, 3 Feb 2010 16:38:09 -0800 (PST) Message-ID: <4B6A16F1.7050405@vmware.com> Date: Thu, 04 Feb 2010 00:38:00 -0000 From: Michael Snyder User-Agent: Thunderbird 2.0.0.22 (X11/20090609) MIME-Version: 1.0 To: Doug Evans , "gdb-patches@sourceware.org" Subject: Re: [patch] gdb.exp (INTERNAL_GDBFLAGS): Don't override value provided by user. References: <20100204002516.DF79F84414@ruffy.mtv.corp.google.com> In-Reply-To: <20100204002516.DF79F84414@ruffy.mtv.corp.google.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2010-02/txt/msg00098.txt.bz2 Doug Evans wrote: > Hi. > > I will check this in tomorrow if there are no objections. How will this affect me? > It is useful to run the testsuite on the installed gdb. > e.g. make check RUNTESTFLAGS=GDB=/usr/bin/gdb > > When testing the installed gdb one would like to test exactly what the > user runs. For environments that have a system.gdbinit (gdb was configured > with --with-system-gdbinit) that means using the installed system.gdbinit > and not anything from the source/build tree. > In order to do this one either needs to not pass "-nx" when dejagnu starts gdb > or pass "-x /path/to/system.gdbinit" in addition to -nx. > I like the former as it's closer to what the user does. > > There is also the issue of not loading ~/.gdbinit when running the > testsuite, but can be solved by pointing $HOME at a directory without > a .gdbinit when running the testsuite. > > [-nx also skips loading of $pwd/.gdbinit, but the testsuite build directory > generally doesn't have one and that's good enough for me for now] > > 2010-02-03 Doug Evans > > * gdb.exp (INTERNAL_GDBFLAGS): Don't override value provided by user. > > Index: gdb.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/lib/gdb.exp,v > retrieving revision 1.135 > diff -u -p -r1.135 gdb.exp > --- gdb.exp 14 Jan 2010 21:12:00 -0000 1.135 > +++ gdb.exp 4 Feb 2010 00:15:25 -0000 > @@ -54,7 +54,10 @@ if ![info exists GDBFLAGS] { > verbose "using GDBFLAGS = $GDBFLAGS" 2 > > # INTERNAL_GDBFLAGS contains flags that the testsuite requires. > -set INTERNAL_GDBFLAGS "-nw -nx" > +global INTERNAL_GDBFLAGS > +if ![info exists INTERNAL_GDBFLAGS] { > + set INTERNAL_GDBFLAGS "-nw -nx" > +} > > # The variable gdb_prompt is a regexp which matches the gdb prompt. > # Set it if it is not already set.