|
|
7ab123 |
Date: Thu, 13 Nov 2014 16:26:37 +0100
|
|
|
7ab123 |
From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
|
|
|
7ab123 |
To: gdb-patches at sourceware dot org
|
|
|
7ab123 |
Cc: Jakub Filak <jfilak at redhat dot com>
|
|
|
7ab123 |
Subject: [patch] Add add-auto-load-scripts-directory
|
|
|
7ab123 |
|
|
|
7ab123 |
--jho1yZJdad60DJr+
|
|
|
7ab123 |
Content-Type: text/plain; charset=us-ascii
|
|
|
7ab123 |
Content-Disposition: inline
|
|
|
7ab123 |
|
|
|
7ab123 |
Hi,
|
|
|
7ab123 |
|
|
|
7ab123 |
there is already "add-auto-load-safe-path" which works
|
|
|
7ab123 |
like "set auto-load safe-path" but in append mode.
|
|
|
7ab123 |
|
|
|
7ab123 |
There was missing an append equivalent for "set auto-load scripts-directory".
|
|
|
7ab123 |
|
|
|
7ab123 |
ABRT has directory /var/cache/abrt-di/ as an alternative one
|
|
|
7ab123 |
to /usr/lib/debug/ . Therefore ABRT needs to use -iex parameters to add this
|
|
|
7ab123 |
/var/cache/abrt-di/ directory as a first-class debuginfo directory.
|
|
|
7ab123 |
Using absolute "set auto-load scripts-directory" would hard-code the path
|
|
|
7ab123 |
possibly overriding local system directory additions; besides it would not be
|
|
|
7ab123 |
nice anyway.
|
|
|
7ab123 |
|
|
|
7ab123 |
No regressions on {x86_64,x86_64-m32,i686}-fedora21-linux-gnu; although I have
|
|
|
7ab123 |
seen some heavy regressions there today unrelated to this patch.
|
|
|
7ab123 |
|
|
|
7ab123 |
|
|
|
7ab123 |
Thanks,
|
|
|
7ab123 |
Jan
|
|
|
7ab123 |
|
|
|
7ab123 |
--jho1yZJdad60DJr+
|
|
|
7ab123 |
Content-Type: text/plain; charset=us-ascii
|
|
|
7ab123 |
Content-Disposition: inline; filename="addautoload.patch"
|
|
|
7ab123 |
|
|
|
7ab123 |
gdb/
|
|
|
7ab123 |
2014-11-13 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
7ab123 |
|
|
|
7ab123 |
Add add-auto-load-scripts-directory.
|
|
|
7ab123 |
* NEWS (Changes since GDB 7.8): Add add-auto-load-scripts-directory.
|
|
|
7ab123 |
* auto-load.c (add_auto_load_dir): New function.
|
|
|
7ab123 |
(_initialize_auto_load): Install it.
|
|
|
7ab123 |
|
|
|
7ab123 |
gdb/doc/
|
|
|
7ab123 |
2014-11-13 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
7ab123 |
|
|
|
7ab123 |
Add add-auto-load-scripts-directory.
|
|
|
7ab123 |
* gdb.texinfo (Auto-loading): Add add-auto-load-scripts-directory link.
|
|
|
7ab123 |
(objfile-gdbdotext file): Add add-auto-load-scripts-directory.
|
|
|
7ab123 |
|
|
|
7ab123 |
Index: gdb-7.6.1/gdb/NEWS
|
|
|
7ab123 |
===================================================================
|
|
|
7ab123 |
--- gdb-7.6.1.orig/gdb/NEWS
|
|
|
7ab123 |
+++ gdb-7.6.1/gdb/NEWS
|
|
|
7ab123 |
@@ -1,6 +1,12 @@
|
|
|
7ab123 |
What has changed in GDB?
|
|
|
7ab123 |
(Organized release by release)
|
|
|
7ab123 |
|
|
|
7ab123 |
+* New commands:
|
|
|
7ab123 |
+
|
|
|
7ab123 |
+add-auto-load-scripts-directory directory
|
|
|
7ab123 |
+ Add entries to the list of directories from which to load auto-loaded
|
|
|
7ab123 |
+ scripts.
|
|
|
7ab123 |
+
|
|
|
7ab123 |
* Newly installed $prefix/bin/gcore acts as a shell interface for the
|
|
|
7ab123 |
GDB command gcore.
|
|
|
7ab123 |
|
|
|
7ab123 |
Index: gdb-7.6.1/gdb/auto-load.c
|
|
|
7ab123 |
===================================================================
|
|
|
7ab123 |
--- gdb-7.6.1.orig/gdb/auto-load.c
|
|
|
7ab123 |
+++ gdb-7.6.1/gdb/auto-load.c
|
|
|
7ab123 |
@@ -298,6 +298,22 @@ Use 'set auto-load safe-path /' for disa
|
|
|
7ab123 |
auto_load_safe_path_vec_update ();
|
|
|
7ab123 |
}
|
|
|
7ab123 |
|
|
|
7ab123 |
+/* "add-auto-load-scripts-directory" command for the auto_load_dir configuration
|
|
|
7ab123 |
+ variable. */
|
|
|
7ab123 |
+
|
|
|
7ab123 |
+static void
|
|
|
7ab123 |
+add_auto_load_dir (char *args, int from_tty)
|
|
|
7ab123 |
+{
|
|
|
7ab123 |
+ char *s;
|
|
|
7ab123 |
+
|
|
|
7ab123 |
+ if (args == NULL || *args == 0)
|
|
|
7ab123 |
+ error (_("Directory argument required."));
|
|
|
7ab123 |
+
|
|
|
7ab123 |
+ s = xstrprintf ("%s%c%s", auto_load_dir, DIRNAME_SEPARATOR, args);
|
|
|
7ab123 |
+ xfree (auto_load_dir);
|
|
|
7ab123 |
+ auto_load_dir = s;
|
|
|
7ab123 |
+}
|
|
|
7ab123 |
+
|
|
|
7ab123 |
/* Implementation for filename_is_in_pattern overwriting the caller's FILENAME
|
|
|
7ab123 |
and PATTERN. */
|
|
|
7ab123 |
|
|
|
7ab123 |
@@ -1295,6 +1311,15 @@ access the current full list setting."),
|
|
|
7ab123 |
&cmdlist);
|
|
|
7ab123 |
set_cmd_completer (cmd, filename_completer);
|
|
|
7ab123 |
|
|
|
7ab123 |
+ cmd = add_cmd ("add-auto-load-scripts-directory", class_support,
|
|
|
7ab123 |
+ add_auto_load_dir,
|
|
|
7ab123 |
+ _("Add entries to the list of directories from which to load "
|
|
|
7ab123 |
+ "auto-loaded scripts.\n\
|
|
|
7ab123 |
+See the commands 'set auto-load scripts-directory' and\n\
|
|
|
7ab123 |
+'show auto-load scripts-directory' to access the current full list setting."),
|
|
|
7ab123 |
+ &cmdlist);
|
|
|
7ab123 |
+ set_cmd_completer (cmd, filename_completer);
|
|
|
7ab123 |
+
|
|
|
7ab123 |
add_setshow_boolean_cmd ("auto-load", class_maintenance,
|
|
|
7ab123 |
&debug_auto_load, _("\
|
|
|
7ab123 |
Set auto-load verifications debugging."), _("\
|
|
|
7ab123 |
Index: gdb-7.6.1/gdb/doc/gdb.texinfo
|
|
|
7ab123 |
===================================================================
|
|
|
7ab123 |
--- gdb-7.6.1.orig/gdb/doc/gdb.texinfo
|
|
|
7ab123 |
+++ gdb-7.6.1/gdb/doc/gdb.texinfo
|
|
|
7ab123 |
@@ -21929,6 +21929,8 @@ These are @value{GDBN} control commands
|
|
|
7ab123 |
@tab Control for @value{GDBN} auto-loaded scripts location.
|
|
|
7ab123 |
@item @xref{show auto-load scripts-directory}.
|
|
|
7ab123 |
@tab Show @value{GDBN} auto-loaded scripts location.
|
|
|
7ab123 |
+@item @xref{add-auto-load-scripts-directory}.
|
|
|
7ab123 |
+@tab Add directory for auto-loaded scripts location list.
|
|
|
7ab123 |
@item @xref{set auto-load local-gdbinit}.
|
|
|
7ab123 |
@tab Control for init file in the current directory.
|
|
|
7ab123 |
@item @xref{show auto-load local-gdbinit}.
|
|
|
7ab123 |
@@ -27213,6 +27215,12 @@ to the @env{PATH} environment variable.
|
|
|
7ab123 |
@kindex show auto-load scripts-directory
|
|
|
7ab123 |
@item show auto-load scripts-directory
|
|
|
7ab123 |
Show @value{GDBN} auto-loaded scripts location.
|
|
|
7ab123 |
+
|
|
|
7ab123 |
+@anchor{add-auto-load-scripts-directory}
|
|
|
7ab123 |
+@kindex add-auto-load-scripts-directory
|
|
|
7ab123 |
+@item add-auto-load-scripts-directory @r{[}@var{directories}@r{]}
|
|
|
7ab123 |
+Add an entry (or list of entries) to the list of auto-loaded scripts locations.
|
|
|
7ab123 |
+Multiple entries may be delimited by the host platform path separator in use.
|
|
|
7ab123 |
@end table
|
|
|
7ab123 |
|
|
|
7ab123 |
@value{GDBN} does not track which files it has already auto-loaded this way.
|