This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[patch 6/6] Forbid local .gdbinit by default
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Sat, 24 Mar 2012 19:41:05 +0100
- Subject: [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;