Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Setting up GDB init files broken in DJGPP
@ 2009-04-14 17:32 Eli Zaretskii
  2009-04-17 17:41 ` Jerome Guitton
  0 siblings, 1 reply; 7+ messages in thread
From: Eli Zaretskii @ 2009-04-14 17:32 UTC (permalink / raw)
  To: Daniel Jacobowitz, Jerome Guitton; +Cc: gdb-patches

AFAICS, this change:

    2009-01-28  Daniel Jacobowitz  <dan@codesourcery.com>
		Jerome Guitton  <guitton@adacore.com>

	    * configure, config.in: Regenerated.
	    * configure.ac: Add --with-system-gdbinit.
	    * main.c (get_init_files): New.
	    (captured_main): Use get_init_files.  Load system gdbinit before
	    $HOME/.gdbinit.
	    (print_gdb_help): Print location of init files.

broke the DJGPP port, in that it now looks for ~/.gdbinit rather than
~/gdb.ini.  (The former is an invalid file name on DOS filesystems.)
So all the gdb.ini files, such as the ones generated while building
GDB and Emacs, are no longer sourced.

The problem is that the change not only introduced a new function
get_init_files and moved the code that looked up the gdbinit file(s)
there from captured_main, but it also caused the code which looks for
these files to be run _before_ initialize_all_files (which is called
inside gdb_init).  In fact, it moved the code even before the
command-line arguments are parsed and acted upon.  The DJGPP build
overrides the default value of gdbinit, assigned in top.c from
GDBINIT_FILENAME, inside init_go32_ops, but that is called in
initialize_all_files, which now is too late.

I've re-read the discussion about this change back in last December,
and I couldn't find anything there that would explain why the order of
the code execution was changed.  Can someone tell whether there were
such reasons, and if so, what they were?  If not, perhaps simply
moving the code after the call to gdb_init is all that's needed to fix
this.

TIA


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-04-27 10:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-14 17:32 Setting up GDB init files broken in DJGPP Eli Zaretskii
2009-04-17 17:41 ` Jerome Guitton
2009-04-17 19:10   ` Eli Zaretskii
2009-04-22 19:38   ` Joel Brobecker
2009-04-22 20:22     ` Jerome Guitton
2009-04-22 20:26       ` Joel Brobecker
2009-04-27 10:25         ` Jerome Guitton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox