This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[suspended patch#3 8/8] Warn (but execute) local .gdbinit by default
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Tue, 3 Apr 2012 20:57:18 +0200
- Subject: [suspended patch#3 8/8] Warn (but execute) local .gdbinit by default
Hi,
it is questionable when/if this patch goes in, just keeping it around for now.
I may need to ask other projects (Emacs was mentioned) first before
deprecating .gdbinit in favor of emacs-gdb.gdb.
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.
gdb/doc/
2012-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (Auto-loading): Update the expected output to
warn-and-yes.
--- a/gdb/auto-load.c
+++ b/gdb/auto-load.c
@@ -110,7 +110,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;
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -20746,7 +20746,8 @@ or disabled.
(gdb) show auto-load
gdb-scripts: Auto-loading of canned sequences of commands scripts is on.
libthread-db: Auto-loading of inferior specific libthread_db is on.
-local-gdbinit: Auto-loading of .gdbinit script from current directory is yes.
+local-gdbinit: Auto-loading of .gdbinit script
+ from current directory is warn-and-yes.
python-scripts: Auto-loading of Python scripts is on.
safe-path: List of directories from which it is safe to auto-load files
is /usr/local.