From 999adef4d955013fd14ea9b54a15c2443b82d99b Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Fri, 30 Jul 2010 18:46:27 +0000 Subject: [PATCH] * gdb.python/py-type.exp (test_template): Mark as xfail tests "python print ttype.template_argument(1)" and "python print isinstance(ttype.template_argument(1), gdb.Value)" if using gcc 4.4 or earlier. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.python/py-type.exp | 14 ++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index adfbeb63381..1332407e166 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2010-07-30 Doug Evans + * gdb.python/py-type.exp (test_template): Mark as xfail tests + "python print ttype.template_argument(1)" and + "python print isinstance(ttype.template_argument(1), gdb.Value)" + if using gcc 4.4 or earlier. + * gdb.base/valgrind-db-attach.exp: Use unique test name for attach-to-debugger handling. diff --git a/gdb/testsuite/gdb.python/py-type.exp b/gdb/testsuite/gdb.python/py-type.exp index 1cdb1c1f730..6e5bd0e8669 100644 --- a/gdb/testsuite/gdb.python/py-type.exp +++ b/gdb/testsuite/gdb.python/py-type.exp @@ -24,6 +24,10 @@ set testfile "py-type" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} +if [get_compiler_info not-used c++] { + return -1; +} + # Build inferior to language specification. proc build_inferior {lang} { global srcdir subdir srcfile binfile testfile hex @@ -136,10 +140,20 @@ proc test_template {} { gdb_test "python print ttype.template_argument(0)" "D" gdb_test "python print isinstance(ttype.template_argument(0), gdb.Type)" \ "True" + # The next two tests require a GCC that emits DW_TAG_template_*. + # GCC 4.4 does not emit it, 4.5 and 6 do emit it. + set have_older_gcc 0 + if {[test_compiler_info {gcc-[0-3]-*}] + || [test_compiler_info {gcc-4-[0-4]-*}]} { + set have_older_gcc 1 + } + if $have_older_gcc { setup_xfail *-*-* } gdb_test "python print ttype.template_argument(1)" "23" + if $have_older_gcc { setup_xfail *-*-* } gdb_test "python print isinstance(ttype.template_argument(1), gdb.Value)" \ "True" + setup_kfail "gcc/41736" *-*-* gdb_test "python print ttype.template_argument(2)" "&C::c" } -- 2.30.2