This is the mail archive of the gdb-patches@sourceware.org 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]

[patch 6/6] Forbid local .gdbinit by default


Hi,

this patch could go in producing for 7.5:

$ ./gdb
warning: Reading file .gdbinit in current directory but it has been deprecated and the reading will be removed.  Use script associated with inferior executable file instead.  See also 'set auto-load local-gdbinit'.  You may also use 'gdb -x .gdbinit ...'.

and in a GDB release or two releases later it gets turned into "warn-and-no":

$ ./gdb
warning: Ignoring file .gdbinit in current directory as it has been deprecated.  Use script associated with inferior executable file instead.  See also 'set auto-load local-gdbinit'.  You may also use 'gdb -x .gdbinit ...'.


Thanks,
Jan


gdb/
2012-03-20  Jan Kratochvil  <jan.kratochvil@redhat.com>

	* auto-load.c (auto_load_local_gdbinit): Change it to
	auto_load_local_gdbinit_warn_and_yes.

--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -109,7 +109,7 @@ static const char *const auto_load_local_gdbinit_enum[] =
 };
 
 /* Auto-load .gdbinit file from the current directory?  */
-const char *auto_load_local_gdbinit = auto_load_local_gdbinit_yes;
+const char *auto_load_local_gdbinit = auto_load_local_gdbinit_warn_and_yes;
 
 /* Absolute pathname to the current directory .gdbinit, if it exists.  */
 char *auto_load_local_gdbinit_pathname = NULL;


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