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,
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
open it, better only print one error message.
catch_command_errors returns non-zero on success! */
if (catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL))
- catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL);
+ catch_command_errors (symbol_file_add_main, symarg, !batch, RETURN_MASK_ALL);
}
else
{
if (execarg != NULL)
catch_command_errors (exec_file_attach, execarg, !batch, RETURN_MASK_ALL);
if (symarg != NULL)
- catch_command_errors (symbol_file_add_main, symarg, 0, RETURN_MASK_ALL);
+ catch_command_errors (symbol_file_add_main, symarg, !batch, RETURN_MASK_ALL);
}
if (corearg && pidarg)