Index: gdb/main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.73 diff -u -p -r1.73 main.c --- gdb/main.c 28 Jan 2009 15:01:00 -0000 1.73 +++ gdb/main.c 17 Apr 2009 17:24:35 -0000 @@ -357,8 +357,6 @@ captured_main (void *data) } } - get_init_files (&system_gdbinit, &home_gdbinit, &local_gdbinit); - /* There will always be an interpreter. Either the one passed into this captured main, or one specified by the user at start up, or the console. Initialize the interpreter to the one requested by @@ -694,6 +692,11 @@ Excess command line arguments ignored. ( 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