aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-04-17 15:56:21 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-04-17 15:56:21 +0000
commit4dc84fd1097fab1fb14a6c77a6b77003296d27eb (patch)
tree4fd4a5a7098fcd3971f63f0ab49b678d14166557 /gdb/doc
parentbccbefd2aab863e24a122ea686cbd263041b4709 (diff)
downloadgdb-4dc84fd1097fab1fb14a6c77a6b77003296d27eb.zip
gdb-4dc84fd1097fab1fb14a6c77a6b77003296d27eb.tar.gz
gdb-4dc84fd1097fab1fb14a6c77a6b77003296d27eb.tar.bz2
gdb/
New option "set debug auto-load". * NEWS: New commands "set debug auto-load" and "show debug auto-load". * auto-load.c (debug_auto_load, show_debug_auto_load: New. (auto_load_safe_path_vec_update) (filename_is_in_auto_load_safe_path_vec): Call fprintf_unfiltered if DEBUG_AUTO_LOAD. (file_is_auto_load_safe): New parameters debug_fmt and .... Call fprintf_unfiltered if DEBUG_AUTO_LOAD. (source_gdb_script_for_objfile): Extend the file_is_auto_load_safe caller by explanatory string. (_initialize_auto_load): Register "set debug auto-load". * auto-load.h (file_is_auto_load_safe): New parameters debug_fmt and .... * linux-thread-db.c (try_thread_db_load_from_pdir_1) (try_thread_db_load_from_dir): Extend the file_is_auto_load_safe caller by explanatory string. * main.c (captured_main): Likewise. * python/py-auto-load.c (gdbpy_load_auto_script_for_objfile) (source_section_scripts): Likewise. gdb/doc/ New option "set debug auto-load". * gdb.texinfo (Auto-loading): New menu item for auto-load verbose mode. (auto-load verbose mode): New node.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog6
-rw-r--r--gdb/doc/gdb.texinfo40
2 files changed, 46 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index b4f18dc..a5d66f0 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,5 +1,11 @@
2012-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+ New option "set debug auto-load".
+ * gdb.texinfo (Auto-loading): New menu item for auto-load verbose mode.
+ (auto-load verbose mode): New node.
+
+2012-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
New option "set auto-load safe-path".
* gdb.texinfo (Auto-loading): Extend the "show auto-load"
and "info auto-load" examples for safe-path. Put there also references
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index ce90f60..14b4fda 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -20978,6 +20978,7 @@ These are @value{GDBN} control commands for the auto-loading:
* libthread_db.so.1 file:: @samp{set/show/info auto-load libthread-db}
* objfile-gdb.gdb file:: @samp{set/show/info auto-load gdb-script}
* Auto-loading safe path:: @samp{set/show/info auto-load safe-path}
+* Auto-loading verbose mode:: @samp{set/show debug auto-load}
@xref{Python Auto-loading}.
@end menu
@@ -21176,6 +21177,45 @@ entries again. @value{GDBN} already canonicalizes most of the filenames on its
own before starting the comparison so a canonical form of directories is
recommended to be entered.
+@node Auto-loading verbose mode
+@subsection Displaying files tried for auto-load
+@cindex auto-loading verbose mode
+
+For better visibility of all the file locations where you can place scripts to
+be auto-loaded with inferior --- or to protect yourself against accidental
+execution of untrusted scripts --- @value{GDBN} provides a feature for printing
+all the files attempted to be loaded. Both existing and non-existing files may
+be printed.
+
+For example the list of directories from which it is safe to auto-load files
+(@pxref{Auto-loading safe path}) applies also to canonicalized filenames which
+may not be too obvious while setting it up.
+
+@smallexample
+(gdb) set debug auto-load ues
+(gdb) file ~/src/t/true
+auto-load: Loading canned sequences of commands script "/tmp/true-gdb.gdb"
+ for objfile "/tmp/true".
+auto-load: Updating directories of "/usr:/opt".
+auto-load: Using directory "/usr".
+auto-load: Using directory "/opt".
+warning: File "/tmp/true-gdb.gdb" auto-loading has been declined
+ by your `auto-load safe-path' set to "/usr:/opt".
+@end smallexample
+
+@table @code
+@anchor{set debug auto-load}
+@kindex set debug auto-load
+@item set debug auto-load [on|off]
+Set whether to print the filenames attempted to be auto-loaded.
+
+@anchor{show debug auto-load}
+@kindex show debug auto-load
+@item show debug auto-load
+Show whether printing of the filenames attempted to be auto-loaded is turned
+on or off.
+@end table
+
@node Messages/Warnings
@section Optional Warnings and Messages