This is the mail archive of the 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: Setting up GDB init files broken in DJGPP

> 2009-04-17  Jerome Guitton  <>
> 	* main.c (captured_main): Move gdbinit lookups after gdb_init.

This looks fine, but I propose we move this call further down, past
the blocks that do an early exist if --version or --help is specified,
as well as past the interpreter initialization. If those fail, no point
in spending time computing these files. That also corresponds better
to what used to be done before.

I'm testing the attached patch... (Jerome is supposed to be on holiday)

commit 9493d644c2a2cb3464cf139515be528a6e140ffe
Author: Joel Brobecker <>
Date:   Wed Apr 22 12:35:50 2009 -0700

        * main.c (captured_main): Move gdbinit lookups further down,
        making sure it's not called until the basename of the gdbinit file
        has been set.

diff --git a/gdb/main.c b/gdb/main.c
index 86607d3..2f6cd75 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -359,8 +359,6 @@ captured_main (void *data)
-  get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit);
   add_substitute_path_rule (RELOC_SRCDIR,
 			    make_relative_prefix (argv[0], BINDIR,
@@ -778,6 +776,8 @@ Excess command line arguments ignored. (%s%s)\n"),
   quit_pre_print = error_pre_print;
   warning_pre_print = _("\nwarning: ");
+  get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit);
   /* Read and execute the system-wide gdbinit file, if it exists.
      This is done *before* all the command line arguments are
      processed; it sets global parameters, which are independent of

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