This is the mail archive of the insight@sourceware.org mailing list for the Insight 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: -nx and .gdbtkinit


Bruce Korb wrote:
What is the processing order of these files?

Another way of putting it: could not the ``-nx'' option be
added to the .gdbtkinit file and cause it to inhibit .gdbinit?
I stubbed my toe on this some time back and it did take some
bother to "get it right".....

You may be right!


When -nx is passed to gdb, gdb's option processing simply set the global inhibit_gdbinit (in main.c). The next thing that happens is that gdb_init is called (which I believe will call gdbtk_init in gdbtk.c eventually).

It is here that ::GDBStartup(inhibit_prefs) is set. When insight is done initializing (including reading preferences), it goes back to captured_main (in main.c), and gdb will eventually check inhibit_gdbinit and read preferences.

So, yes, you could add a preference to insight & .gdbtkinit/gdbtk.ini to inhibit reading gdb preferences (aka, set inhibit_gdbinit in main.c).

Good catch!
Keith


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