aboutsummaryrefslogtreecommitdiff
path: root/gdb/main.c
diff options
context:
space:
mode:
authorJerome Guitton <guitton@adacore.com>2009-04-27 10:24:08 +0000
committerJerome Guitton <guitton@adacore.com>2009-04-27 10:24:08 +0000
commit57a460012a55aec007ee5ea2f229f79699cfd01a (patch)
tree22b38ca2cb662229793b283869fbe9f66f30e1c2 /gdb/main.c
parentd389af10b70d4c5be1a4a7d1317c0e6020cac979 (diff)
downloadgdb-57a460012a55aec007ee5ea2f229f79699cfd01a.zip
gdb-57a460012a55aec007ee5ea2f229f79699cfd01a.tar.gz
gdb-57a460012a55aec007ee5ea2f229f79699cfd01a.tar.bz2
* main.c (captured_main): Move gdbinit lookups after gdb_init.
Diffstat (limited to 'gdb/main.c')
-rw-r--r--gdb/main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/main.c b/gdb/main.c
index 27870c7..8b66f78 100644
--- a/gdb/main.c
+++ b/gdb/main.c
@@ -346,8 +346,6 @@ captured_main (void *data)
gdb_datadir = relocate_directory (argv[0], GDB_DATADIR,
GDB_DATADIR_RELOCATABLE);
- get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit);
-
#ifdef RELOC_SRCDIR
add_substitute_path_rule (RELOC_SRCDIR,
make_relative_prefix (argv[0], BINDIR,
@@ -689,6 +687,11 @@ Excess command line arguments ignored. (%s%s)\n"),
control of the console via the deprecated_init_ui_hook (). */
gdb_init (argv[0]);
+ /* Lookup gdbinit files. Note that the gdbinit file name may be overriden
+ during file initialization, so get_init_files should be called after
+ gdb_init. */
+ get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit);
+
/* Do these (and anything which might call wrap_here or *_filtered)
after initialize_all_files() but before the interpreter has been
installed. Otherwize the help/version messages will be eaten by