aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2012-04-17 15:54:35 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2012-04-17 15:54:35 +0000
commitbccbefd2aab863e24a122ea686cbd263041b4709 (patch)
tree10470bdc16fff1f1e020d6c8e58913e84ab39575 /gdb/testsuite
parentbf88dd68493db2b646b42165e6258573d3a597b5 (diff)
downloadgdb-bccbefd2aab863e24a122ea686cbd263041b4709.zip
gdb-bccbefd2aab863e24a122ea686cbd263041b4709.tar.gz
gdb-bccbefd2aab863e24a122ea686cbd263041b4709.tar.bz2
gdb/
New option "set auto-load safe-path". * NEWS: New commands "set auto-load safe-path" and "show auto-load safe-path". * auto-load.c: Include gdb_vecs.h, readline/tilde.h and completer.h. (auto_load_safe_path, auto_load_safe_path_vec) (auto_load_safe_path_vec_update, set_auto_load_safe_path) (show_auto_load_safe_path, add_auto_load_safe_path, filename_is_in_dir) (filename_is_in_auto_load_safe_path_vec, file_is_auto_load_safe): New. (source_gdb_script_for_objfile): New variable is_safe. Call file_is_auto_load_safe. Return if it is not. (struct loaded_script): New field loaded. (maybe_add_script): Add parameter loaded. Initialize SLOT with it. (print_script): Use LOADED indicator instead of FULL_PATH. Change output "Missing" to "No". (_initialize_auto_load): New variable cmd. Initialize auto_load_safe_path. Register "set auto-load safe-path", "show auto-load safe-path" and "add-auto-load-safe-path". * auto-load.h (maybe_add_script): Add parameter loaded. (file_is_auto_load_safe): New declaration. * config.in: Regenerate. * configure: Regenerate. * configure.ac: New parameters --with-auto-load-safe-path and --without-auto-load-safe-path. * linux-thread-db.c (try_thread_db_load_from_pdir_1) (try_thread_db_load_from_dir): Check file_is_auto_load_safe first. * main.c (captured_main): Check file_is_auto_load_safe for LOCAL_GDBINIT. * python/py-auto-load.c (gdbpy_load_auto_script_for_objfile): New variable is_safe. Call file_is_auto_load_safe. Return if it is not. (source_section_scripts): Call file_is_auto_load_safe. Return if it is not. gdb/doc/ 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 for "set auto-load safe-path" and "show auto-load safe-path". New menu item for Auto-loading safe path. (Auto-loading safe path): New node. (Python Auto-loading): Update the expected output from "Missing" to "No". gdb/testsuite/ New option "set auto-load safe-path". * gdb.python/py-objfile-script.exp (set auto-load safe-path): New. * gdb.python/py-section-script.exp (set auto-load safe-path): New.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.python/py-objfile-script.exp1
-rw-r--r--gdb/testsuite/gdb.python/py-section-script.exp1
3 files changed, 8 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 249bb43..de35ced 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2012-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+ New option "set auto-load safe-path".
+ * gdb.python/py-objfile-script.exp (set auto-load safe-path): New.
+ * gdb.python/py-section-script.exp (set auto-load safe-path): New.
+
+2012-04-17 Jan Kratochvil <jan.kratochvil@redhat.com>
+
auto-load: Implementation.
* gdb.base/help.exp (test set height): Increase the height.
* gdb.python/py-objfile-script.exp (info auto-load-scripts): Change
diff --git a/gdb/testsuite/gdb.python/py-objfile-script.exp b/gdb/testsuite/gdb.python/py-objfile-script.exp
index 0143838..12d6795 100644
--- a/gdb/testsuite/gdb.python/py-objfile-script.exp
+++ b/gdb/testsuite/gdb.python/py-objfile-script.exp
@@ -37,6 +37,7 @@ if { [skip_python_tests] } { continue }
set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}-gdb.py.in ${subdir}/${testfile}-gdb.py]
gdb_reinitialize_dir $srcdir/$subdir
+gdb_test_no_output "set auto-load safe-path ${remote_python_file}" "set auto-load safe-path"
gdb_load ${binfile}
# Verify gdb loaded the script.
diff --git a/gdb/testsuite/gdb.python/py-section-script.exp b/gdb/testsuite/gdb.python/py-section-script.exp
index 0b4b46b..d070f13 100644
--- a/gdb/testsuite/gdb.python/py-section-script.exp
+++ b/gdb/testsuite/gdb.python/py-section-script.exp
@@ -49,6 +49,7 @@ if { [skip_python_tests] } { continue }
set remote_python_file [remote_download host ${srcdir}/${subdir}/${testfile}.py]
gdb_reinitialize_dir $srcdir/$subdir
+gdb_test_no_output "set auto-load safe-path ${remote_python_file}" "set auto-load safe-path"
gdb_load ${binfile}
# Verify gdb loaded the script.