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


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 <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.

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 <prefix>/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!


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