From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18044 invoked by alias); 14 Dec 2008 18:36:26 -0000 Received: (qmail 18035 invoked by uid 22791); 14 Dec 2008 18:36:25 -0000 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; Sun, 14 Dec 2008 18:35:34 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id A58E810CD6; Sun, 14 Dec 2008 18:35:32 +0000 (GMT) Received: from caradoc.them.org (unknown [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 91F6E10AD0; Sun, 14 Dec 2008 18:35:32 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LBvoS-0007Zs-6b; Sun, 14 Dec 2008 13:35:32 -0500 Date: Sun, 14 Dec 2008 18:36:00 -0000 From: Daniel Jacobowitz To: Jerome Guitton Cc: gdb@sourceware.org Subject: Re: global, target-specific, init files Message-ID: <20081214183532.GB28806@caradoc.them.org> Mail-Followup-To: Jerome Guitton , gdb@sourceware.org References: <20081214124549.GA25544@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20081214124549.GA25544@adacore.com> User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes 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/msg00057.txt.bz2 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. 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. -- Daniel Jacobowitz CodeSourcery