aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-05-11 18:13:26 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-05-11 18:13:26 +0000
commit6dea1fbd79e621463ba1eba5b4b417ecdf16b3eb (patch)
tree5727bd072f3366487e443e98d1df9f4543393eaa /gdb/doc
parentb09aca3aa72db7e4cd8f301984b42bbe3cb319f8 (diff)
downloadgdb-6dea1fbd79e621463ba1eba5b4b417ecdf16b3eb.zip
gdb-6dea1fbd79e621463ba1eba5b4b417ecdf16b3eb.tar.gz
gdb-6dea1fbd79e621463ba1eba5b4b417ecdf16b3eb.tar.bz2
gdb/
Provide $ddir substitution for --with-auto-load-safe-path. * NEWS (--with-auto-load-safe-path, --without-auto-load-safe-path): New entries. * auto-load.c: Include observer.h. (auto_load_safe_path_vec_update): Call substitute_path_component for each component. New variable ddir_subst. (auto_load_gdb_datadir_changed): New function. (set_auto_load_safe_path): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH. New comment. (_initialize_auto_load): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH. Install auto_load_gdb_datadir_changed. * config.in: Regenerate. * configure: Regenerate. * configure.ac (--auto-load-safe-path): Rename DEFAULT_AUTO_LOAD_SAFE_PATH to AUTO_LOAD_SAFE_PATH. Default to GDB_DATADIR/auto-load. * defs.h (substitute_path_component): New declaration. * top.c: Include observer.h. (set_gdb_datadir): New function. (init_main): Install it for "set data-directory". * utils.c (substitute_path_component): New function. gdb/doc/ Provide $ddir substitution for --with-auto-load-safe-path. * gdb.texinfo (Auto-loading): Replace /usr/local by $ddir/auto-load. (Auto-loading safe path): Likewise. Mention the default value, $ddir substitution, --with-auto-load-safe-path and --without-auto-load-safe-path. * observer.texi (gdb_datadir_changed): New.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog9
-rw-r--r--gdb/doc/gdb.texinfo19
-rw-r--r--gdb/doc/observer.texi4
3 files changed, 28 insertions, 4 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 502a9e5..9cdc2ba 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-11 Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ Provide $ddir substitution for --with-auto-load-safe-path.
+ * gdb.texinfo (Auto-loading): Replace /usr/local by $ddir/auto-load.
+ (Auto-loading safe path): Likewise. Mention the default value,
+ $ddir substitution, --with-auto-load-safe-path and
+ --without-auto-load-safe-path.
+ * observer.texi (gdb_datadir_changed): New.
+
2012-05-09 Jan Kratochvil <jan.kratochvil@redhat.com>
* gdb.texinfo (Auto-loading): Wrap too long lines in @smallexample.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 5d8444c..eab9774 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -21008,7 +21008,7 @@ local-gdbinit: Auto-loading of .gdbinit script from current directory
is on.
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.
+ is $ddir/auto-load.
@end smallexample
@anchor{info auto-load}
@@ -21211,9 +21211,9 @@ get loaded:
$ ./gdb -q ./gdb
Reading symbols from /home/user/gdb/gdb...done.
warning: File "/home/user/gdb/gdb-gdb.gdb" auto-loading has been
- declined by your `auto-load safe-path' set to "/usr/local".
+ declined by your `auto-load safe-path' set to "$ddir/auto-load".
warning: File "/home/user/gdb/gdb-gdb.py" auto-loading has been
- declined by your `auto-load safe-path' set to "/usr/local".
+ declined by your `auto-load safe-path' set to "$ddir/auto-load".
@end smallexample
The list of trusted directories is controlled by the following commands:
@@ -21245,7 +21245,18 @@ loading and execution of scripts. Multiple entries may be delimited by the
host platform path separator in use.
@end table
-Setting this variable to @file{/} disables this security protection.
+This variable defaults to @file{$ddir/auto-load}. The default @code{set
+auto-load safe-path} value can be also overriden by @value{GDBN} configuration
+option @option{--with-auto-load-safe-path}.
+
+Any used string @file{$ddir} will get replaced by @var{data-directory} which is
+determined at @value{GDBN} startup (@pxref{Data Files}). @file{$ddir} must be
+be placed as a directory component --- either alone or delimited by @file{/} or
+@file{\} directory separators, depending on the host platform.
+
+Setting this variable to @file{/} disables this security protection,
+corresponding @value{GDBN} configuration option is
+@option{--without-auto-load-safe-path}.
This variable is supposed to be set to the system directories writable by the
system superuser only. Users can add their source directories in init files in
their home directories (@pxref{Home Directory Init File}). See also deprecated
diff --git a/gdb/doc/observer.texi b/gdb/doc/observer.texi
index 24233cb..6827ed8 100644
--- a/gdb/doc/observer.texi
+++ b/gdb/doc/observer.texi
@@ -226,6 +226,10 @@ Called before a top-level prompt is displayed. @var{current_prompt} is
the current top-level prompt.
@end deftypefun
+@deftypefun void gdb_datadir_changed (void)
+Variable gdb_datadir has been set. The value may not necessarily change.
+@end deftypefun
+
@deftypefun void test_notification (int @var{somearg})
This observer is used for internal testing. Do not use.
See testsuite/gdb.gdb/observer.exp.