aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2007-01-23 17:11:55 +0000
committerDaniel Jacobowitz <drow@false.org>2007-01-23 17:11:55 +0000
commite515b470281c9dab5de4e7eace22200a577dbf55 (patch)
tree3a376e92fc44666d7bfdbcdffcfcd0fc743e841c /gdb/testsuite/lib
parent723cda25827919370128f30e71a2b01450b4a522 (diff)
downloadgdb-e515b470281c9dab5de4e7eace22200a577dbf55.zip
gdb-e515b470281c9dab5de4e7eace22200a577dbf55.tar.gz
gdb-e515b470281c9dab5de4e7eace22200a577dbf55.tar.bz2
* Makefile.in (ALL_SUBDIRS): Add gdb.xml.
* configure: Regenerated. * configure.ac (AC_OUTPUT): Add gdb.xml/Makefile. * gdb.xml/Makefile.in, gdb.xml/tdesc-arch.exp, gdb.xml/tdesc-bogus.xml, gdb.xml/tdesc-errors.exp, gdb.xml/trivial.xml, gdb.xml/tdesc-unknown.xml: New files. * lib/gdb.exp (gdb_skip_xml_test): New function.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp23
1 files changed, 23 insertions, 0 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 7d785bc..6a261f0 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -2280,6 +2280,29 @@ proc gdb_skip_bogus_test { msg } {
return 0;
}
+# Return true if a test should be skipped due to lack of XML support
+# in the host GDB.
+
+proc gdb_skip_xml_test { } {
+ global gdb_prompt
+ global srcdir
+ global xml_missing_cached
+
+ if {[info exists xml_missing_cached]} {
+ return $xml_missing_cached
+ }
+
+ gdb_start
+ set xml_missing_cached 0
+ gdb_test_multiple "set tdesc filename ${srcdir}/gdb.xml/trivial.xml" "" {
+ -re ".*XML support was disabled at compile time.*$gdb_prompt $" {
+ set xml_missing_cached 1
+ }
+ -re ".*$gdb_prompt $" { }
+ }
+ gdb_exit
+ return $xml_missing_cached
+}
# Note: the procedure gdb_gnu_strip_debug will produce an executable called
# ${binfile}.dbglnk, which is just like the executable ($binfile) but without