From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6151 invoked by alias); 15 Dec 2008 11:59:14 -0000 Received: (qmail 6139 invoked by uid 22791); 15 Dec 2008 11:59:13 -0000 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 15 Dec 2008 11:58:34 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 216452900A5 for ; Mon, 15 Dec 2008 12:58:32 +0100 (CET) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id cP7Y11v9aD5X for ; Mon, 15 Dec 2008 12:58:31 +0100 (CET) Received: from province.act-europe.fr (province.act-europe.fr [10.10.0.214]) by mel.act-europe.fr (Postfix) with ESMTP id 180922900A1 for ; Mon, 15 Dec 2008 12:58:31 +0100 (CET) Received: by province.act-europe.fr (Postfix, from userid 560) id 01487165BED; Mon, 15 Dec 2008 12:58:30 +0100 (CET) Date: Mon, 15 Dec 2008 11:59:00 -0000 From: Jerome Guitton To: gdb@sourceware.org Subject: Re: global, target-specific, init files Message-ID: <20081215115830.GI34644@adacore.com> References: <20081214124549.GA25544@adacore.com> <20081214183532.GB28806@caradoc.them.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081214183532.GB28806@caradoc.them.org> User-Agent: Mutt/1.5.17 (2007-11-01) Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-12/txt/msg00064.txt.bz2 Daniel Jacobowitz (drow@false.org): > On Sun, Dec 14, 2008 at 01:45:49PM +0100, Jerome Guitton wrote: > > To deal with these two problems, here is what I would suggest: > > 1) Have target-specific gdb init files, named after the configure target > > name (e.g. .powerpc-elf-gdbinit). .gdbinit would be the target-independant > > gdb init file; > > 2) Have "global" init files located in /etc (if the gdb executable > > is installed in /bin; would be re-computed by gdb at run > > time, just like gcc does for GCC_PREFIX). > > You should be able to use one solution to solve both of your > problems. Pass the name of the global initialization file on GDB's > configure line, and put $target in the name of the file. Have > the target-specific file load any global file. Let me make sure that I understand your suggestion. We would have a new configure option in gdb, let's say --global-init-file=GDBINIT; GDBINIT would be the name of this global init file; the path to this init file would be /etc/GDBINIT (would it)? About the target-specific file, I am not sure I understand your suggestion. I am confused: I was talking about three target-specific files, actually. Let's say: the global target-specific init, the user-specific target-specific init (in $HOME), the local target-specific init (in current dir). Not sure that these three options are really useful. In the scenario that I gave, only the global target-specific init is needed. So my question would be: which target-specific are you actually referring to? > I can save you some time, if you'd like. I recently posted a patch > for user-defined subcommands; the other half of the project which > produced that patch was a global gdbinit file, and I can separate out > the rest of that patch for you this week. That would certainly be very useful, thanks!