aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-10-13 20:08:46 +0000
committerDoug Evans <dje@google.com>2010-10-13 20:08:46 +0000
commit0e3509dbced8d51a4293ab311eac20a2aee8cfdf (patch)
treeaeb24174c6105a11cf8d6e78fd6d2682065190c6 /gdb/testsuite/lib
parent577ce03a7c7132afb57ce6ebd2ce2c155110ccd4 (diff)
downloadgdb-0e3509dbced8d51a4293ab311eac20a2aee8cfdf.zip
gdb-0e3509dbced8d51a4293ab311eac20a2aee8cfdf.tar.gz
gdb-0e3509dbced8d51a4293ab311eac20a2aee8cfdf.tar.bz2
New python module gdb.types.
* NEWS: Document it. * data-directory/Makefile.in (PYTHON_FILES): Add gdb/types.py. * python/lib/gdb/types.py: New file. testsuite/ * lib/gdb-python.exp (gdb_check_python_config): New function. * gdb.python/Makefile.in (EXECUTABLES): Add lib-types. * gdb.python/lib-types.cc: New file. * gdb.python/lib-types.exp: New file. doc/ * gdb.texinfo (Python): Add "Python modules". (Types in Python): Add reference to gdb.types section. (Python modules): New node.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb-python.exp18
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb-python.exp b/gdb/testsuite/lib/gdb-python.exp
index 4a15d7a..58deadc 100644
--- a/gdb/testsuite/lib/gdb-python.exp
+++ b/gdb/testsuite/lib/gdb-python.exp
@@ -45,3 +45,21 @@ proc gdb_py_test_multiple { name args } {
}
return 0
}
+
+# Establish various python configuration parameters if necessary.
+# E.g. sys.path.
+
+proc gdb_check_python_config { } {
+ global USE_INSTALLED_TREE
+ # If we're running an installed version of gdb, and we want to test the
+ # installed versions of the python support scripts, then we don't want
+ # to point data-directory at the build tree.
+ if { [info exists USE_INSTALLED_TREE] && "$USE_INSTALLED_TREE" == "yes" } {
+ verbose -log "Assuming system config already installed."
+ } else {
+ verbose -log "Installing system config from build tree."
+ set gdb_data_dir "[pwd]/../data-directory"
+ gdb_test_no_output "set data-directory $gdb_data_dir"
+ gdb_test_no_output "python GdbSetPythonDirectory ('$gdb_data_dir/python')"
+ }
+}