This is the mail archive of the gdb-patches@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]

Re: [prelim patch] Add the notion of a global init file to gdb.


"Chris G. Demetriou" wrote:
> 
> So, in some work that I've been doing on GDB, it's been very useful to
> have a global init file, that gets sourced before $(HOME)/.gdbinit or
> ./.gdbinit, to set up "site"-specific things such as user-defined
> commands that all users of the tools will want.  (Basically, to extend
> GDB in a way that's not really noticeable to random users.)
> 
> Below is a preliminary, and incomplete, patch to add such a global
> init file to gdb, enabled by a configure option,
> "--enable-global-gdbinit=FILENAME".
> 
> It is _not_ ready for approval.  At minimum, it requires updates to
> the documentation, etc.
> 
> I'm mostly looking for feedback on:
> 
> (1) Is this a generally useful feature, a "good idea"?, and
> 
> (2) the names of the various added pieces.
> 
> If this feature is deemed worht having, I'll update the patch to
> include doc changes and any changes caused by the feedback itself and
> resubmit it for inclusion.
> 
> Comments?
> 

First of all, we must make sure gdb mentions that it found this file and it is
"sourcing" it.  Imagine how difficult it can be to debug gdb problems without
knowing that some commands were executed at startup.

And will -nx inhibit global, $HOME and start directory gdbinits?
Or just the last two?






-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

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