From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12778 invoked by alias); 6 Oct 2009 08:48:11 -0000 Received: (qmail 12764 invoked by uid 22791); 6 Oct 2009 08:48:10 -0000 X-SWARE-Spam-Status: No, hits=-2.3 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; Tue, 06 Oct 2009 08:48:04 +0000 Received: (qmail 30821 invoked from network); 6 Oct 2009 08:48:01 -0000 Received: from unknown (HELO orlando) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 6 Oct 2009 08:48:01 -0000 From: Pedro Alves To: =?iso-8859-1?q?S=E9rgio_Durigan_J=FAnior?= Subject: Re: Can we make gdbinit.in set the data-directory to @srcdir@? Date: Tue, 06 Oct 2009 08:48:00 -0000 User-Agent: KMail/1.9.10 Cc: gdb-patches@sourceware.org, Joel Brobecker References: <200910022056.30734.pedro@codesourcery.com> <200910051441.47781.pedro@codesourcery.com> <200910060144.08110.sergiodj@linux.vnet.ibm.com> In-Reply-To: <200910060144.08110.sergiodj@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200910060948.04899.pedro@codesourcery.com> 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: 2009-10/txt/msg00122.txt.bz2 On Tuesday 06 October 2009 05:44:08, S=E9rgio Durigan J=FAnior wrote: > Also, there's one more thing I'd like to point out. The catch syscall=20 > testcase partially relies in the fact that GDB will not have the data- > directory automatically set on startup.=20 The tests run with "gdb -nx", thus garanteed to skip any .gdbinit file. (I did check that the patch had introduced no regressions.) > This is because, among other things,=20=20 > it has to test how GDB behaves when it doesn't have access to the XML fil= es=20 > for the architecture (or even when those files don't exist at all), and t= his=20 > scenario is achieved when data-directory is empty. But, data-directory isn't empty by default. (gdb) show data-directory GDB's data directory is "/usr/local/share/gdb". > Anyway, if we decide to make this parameter be automatically set upon GDB= 's=20 > initialization in the build dir, we have to make sure that this doesn't b= reak=20 > the testcase (I didn't test this specific case yet, but IIRC it's likely = that=20 > it will break). If it does, we may need to unset it on some situations i= nside=20 > the testcase in order to make it work properly. Oh, the test is broken if the default system data-directory _does_ have contents in it, from a previous installation. Easy to test. S= ee: Using the default /usr/local/ prefix, no gdb installed yet: $ make check RUNTESTFLAGS=3D"catch-syscall.exp" ... # of expected passes 45 $ sudo make install ... yadda, yadda ... $ make check RUNTESTFLAGS=3D"catch-syscall.exp" Running ../../../src/gdb/testsuite/gdb.base/catch-syscall.exp ... FAIL: gdb.base/catch-syscall.exp: Catch syscall displays a warning when th= ere is no XML support FAIL: gdb.base/catch-syscall.exp: catch syscall with arguments (3) FAIL: gdb.base/catch-syscall.exp: syscall(s) 3 appears in 'info breakpoint= s' FAIL: gdb.base/catch-syscall.exp: program has called 3 FAIL: gdb.base/catch-syscall.exp: syscall 3 has returned --=20 Pedro Alves