From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15460 invoked by alias); 6 Oct 2009 05:34:51 -0000 Received: (qmail 15450 invoked by uid 22791); 6 Oct 2009 05:34:50 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 06 Oct 2009 05:34:46 +0000 Received: from wpaz5.hot.corp.google.com (wpaz5.hot.corp.google.com [172.24.198.69]) by smtp-out.google.com with ESMTP id n965YgNQ000491 for ; Tue, 6 Oct 2009 06:34:43 +0100 Received: from pxi26 (pxi26.prod.google.com [10.243.27.26]) by wpaz5.hot.corp.google.com with ESMTP id n965YdUR032390 for ; Mon, 5 Oct 2009 22:34:40 -0700 Received: by pxi26 with SMTP id 26so3275852pxi.25 for ; Mon, 05 Oct 2009 22:34:39 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.169.19 with SMTP id r19mr111214rve.235.1254807279424; Mon, 05 Oct 2009 22:34:39 -0700 (PDT) In-Reply-To: <200910060144.08110.sergiodj@linux.vnet.ibm.com> References: <200910022056.30734.pedro@codesourcery.com> <200910041453.59509.pedro@codesourcery.com> <200910051441.47781.pedro@codesourcery.com> <200910060144.08110.sergiodj@linux.vnet.ibm.com> Date: Tue, 06 Oct 2009 05:34:00 -0000 Message-ID: Subject: Re: Can we make gdbinit.in set the data-directory to @srcdir@? From: Doug Evans To: =?ISO-8859-1?Q?S=E9rgio_Durigan_J=FAnior?= Cc: gdb-patches@sourceware.org, Pedro Alves , Joel Brobecker Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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/msg00118.txt.bz2 2009/10/5 S=E9rgio Durigan J=FAnior : > On Monday 05 October 2009, Pedro Alves wrote: >> On Sunday 04 October 2009 14:53:58, Pedro Alves wrote: >> > On Friday 02 October 2009 22:05:06, Joel wrote: >> > > > 2009-10-02 =A0Pedro Alves =A0 >> > > > >> > > > =A0 =A0 =A0 =A0 * gdbinit.in: set data-directory to @srcdir@. >> >> On second thought, this was a bad idea. =A0.gdbinit is for the >> top (maybe system) gdb, not for the just built, non-installed >> gdb. =A0Sorry for the confusion. =A0I'll revert. > > > Also, there's one more thing I'd like to point out. =A0The catch syscall > testcase partially relies in the fact that GDB will not have the data- > directory automatically set on startup. =A0This is because, among other t= hings, > it has to test how GDB behaves when it doesn't have access to the XML fil= es > for the architecture (or even when those files don't exist at all), and t= his > scenario is achieved when data-directory is empty. > > Anyway, if we decide to make this parameter be automatically set upon GDB= 's > initialization in the build dir, we have to make sure that this doesn't b= reak > the testcase (I didn't test this specific case yet, but IIRC it's likely = that > it will break). =A0If it does, we may need to unset it on some situations= inside > the testcase in order to make it work properly. I think data-dir *is* set on start up, and we want it to. The testcase should set data-dir to something appropriate instead of assuming what it is (or isn't). Maybe the testcase could set data-dir to something that doesn't exist when testing for non-existent xml files, etc. Since the syscall files aren't read until the first request, one can set data-dir to a non-existent directory first, and then do "catch syscall". > Just my two cents. =A0Regards, Ditto!