This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: global, target-specific, init files
- From: Daniel Jacobowitz <drow at false dot org>
- To: Jerome Guitton <guitton at adacore dot com>
- Cc: gdb at sourceware dot org
- Date: Sun, 14 Dec 2008 13:35:32 -0500
- Subject: Re: global, target-specific, init files
- References: <20081214124549.GA25544@adacore.com>
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 <prefix>/etc (if the gdb executable
> is installed in <prefix>/bin; <prefix> 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