This is the mail archive of the gdb@sources.redhat.com 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: patch to use target specific .gdbinit file


> Kris,
>
> In the past there was a proposal (patch?) to add a configuration time
> option that would specify a system init file.  There was a patch.  I
> believe that the actual idea was accepted as sound but the patch was
> lost in the paper trail :-(  Can I suggest extending your patch so that
> the mechanism and file are specified at configure time (please don't ask
> me which of --with or --use or --... is the correct option :-).

One problem with this (as Felix suggested earlier) is dealing with a gdb
which supports multiple targets.  The whole point is to be able to have
per-target init files and hard wiring it in loses that.  Specifying at
config time would be okay for enable/disable but I think it would be better
to have some sort of system of nomenclature for extra init files.

Here's a question: does a multi-targetted gdb know what it's targetting at
the point of reading the .gdbinit or is this determined later?  Is it
switchable per session?  I'm thinking that another possibility is to have it
check for .gdbinit-$TARGET at the time that the target is determined.

cheers,

Kris

> Some things to think about:
> - a command to display the .gdbinit load order (with doco).  If people
> get wierd behavour, being able to dsiplay this will be useful.
> - doco (hmm, is there any config doco?) on the config option
>
> Per earlier e-mail, I don't personally thing that .gdbinit-$TARGET is a
> good idea.
>
> You'll want to double check this with both Fernando (CLI) and Elena
(top.c).
>
> Andrew


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