This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: global, target-specific, init files


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]