From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3305 invoked by alias); 14 Jan 2009 21:55:17 -0000 Received: (qmail 3294 invoked by uid 22791); 14 Jan 2009 21:55:17 -0000 X-SWARE-Spam-Status: No, hits=1.8 required=5.0 tests=AWL,BAYES_00,BOTNET,RCVD_IN_SORBS_WEB,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout1.012.net.il (HELO mtaout1.012.net.il) (84.95.2.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Jan 2009 21:54:36 +0000 Received: from conversion-daemon.i-mtaout1.012.net.il by i-mtaout1.012.net.il (HyperSendmail v2007.08) id <0KDH00K00E4Y6D00@i-mtaout1.012.net.il> for gdb-patches@sourceware.org; Wed, 14 Jan 2009 23:53:33 +0200 (IST) Received: from HOME-C4E4A596F7 ([77.127.202.36]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KDH00HT6E59MLO0@i-mtaout1.012.net.il>; Wed, 14 Jan 2009 23:53:33 +0200 (IST) Date: Wed, 14 Jan 2009 21:55:00 -0000 From: Eli Zaretskii Subject: Re: Add support for --with-system-gdbinit In-reply-to: <20090114203755.GB15499@caradoc.them.org> To: Daniel Jacobowitz Cc: gdb-patches@sourceware.org, guitton@adacore.com Reply-to: Eli Zaretskii Message-id: References: <20090114135619.GA24456@caradoc.them.org> <20090114194922.GA13339@caradoc.them.org> <20090114203755.GB15499@caradoc.them.org> 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-01/txt/msg00336.txt.bz2 > Date: Wed, 14 Jan 2009 15:37:55 -0500 > From: Daniel Jacobowitz > Cc: gdb-patches@sourceware.org, guitton@adacore.com > > On Wed, Jan 14, 2009 at 10:21:34PM +0200, Eli Zaretskii wrote: > > > If you configure GDB using --prefix=$prefix > > > --with-system-gdbinit=$prefix/etc/gdbinit, then a GDB installed in > > > $prefix/bin will load $prefix/etc/gdbinit at startup. If the tree > > > is copied to /other/prefix, then GDB will load > > > /other/prefix/etc/gdbinit. > > > > If GDB can detect the right prefix for the system-wide gdbinit file, > > why does it need to be configured for a specific place ($prefix/etc) > > to begin with? > > I'm sorry, I don't understand your question - could you explain? By specifying the --with-system-gdbinit=$prefix/etc/gdbinit switch to configure, we tell GDB to find gdbinit in that specific absolute location. But you also tell that moving GDB into another location does not prevent GDB from finding gdbinit in that other location. That begs the question: if GDB can find gdbinit even after it is moved, why do we need to specify $prefix in the --with-system-gdbinit option in the first place? Evidently, all GDB needs is to know that gdbinit will be in the etc/ subdirectory of the top of its tree, so it can look there without me telling it where that top will be by default. IOW, it sounds like --with-system-gdbinit=etc/gdbinit should be enough; the $prefix part is redundant. (This is unrelated to my comments about picking a name for this file and showing its location in --help. It's just for my understanding of how this works, and figuring out what do we need to tell the users in the manual.)