From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15271 invoked by alias); 14 Jan 2009 23:07:14 -0000 Received: (qmail 15263 invoked by uid 22791); 14 Jan 2009 23:07:13 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Jan 2009 23:06:32 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 72ED410632; Wed, 14 Jan 2009 23:06:30 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 094F41053D; Wed, 14 Jan 2009 23:06:29 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LNEof-0002Bq-A7; Wed, 14 Jan 2009 18:06:29 -0500 Date: Wed, 14 Jan 2009 23:07:00 -0000 From: Daniel Jacobowitz To: Eli Zaretskii Cc: gdb-patches@sourceware.org, guitton@adacore.com Subject: Re: Add support for --with-system-gdbinit Message-ID: <20090114230629.GA8400@caradoc.them.org> Mail-Followup-To: Eli Zaretskii , gdb-patches@sourceware.org, guitton@adacore.com References: <20090114135619.GA24456@caradoc.them.org> <20090114194922.GA13339@caradoc.them.org> <20090114203755.GB15499@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) 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/msg00338.txt.bz2 On Wed, Jan 14, 2009 at 11:53:23PM +0200, Eli Zaretskii wrote: > 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. I understand now. There's an alternative to keeping it in the same tree: --prefix=/my/working/directory --with-system-gdbinit=/etc/gdbinit In this version /etc is not relative to $prefix, so it wasn't redundant. This example may seem a little weird, but it makes more sense for --with-debug-file-directory; your native system's libraries are always in /usr/lib/debug, no matter where GDB goes. This relocation scheme is a bit complicated. I bear some blame for that, though I didn't invent it; I just propogated the logic from its original home in GCC. -- Daniel Jacobowitz CodeSourcery