diff options
author | Mark Wielaard <mjw@redhat.com> | 2014-05-21 16:00:05 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2014-05-21 16:59:55 +0200 |
commit | 36d46afba6409208a8344aad8700c14eaa51b59d (patch) | |
tree | 1b7b1b1521b2ea9ecb194d222a74edf807c0d0cb /gdb | |
parent | 5876f5032f60c45c4bd19e7ea7d0c14d0346b93e (diff) | |
download | gdb-36d46afba6409208a8344aad8700c14eaa51b59d.zip gdb-36d46afba6409208a8344aad8700c14eaa51b59d.tar.gz gdb-36d46afba6409208a8344aad8700c14eaa51b59d.tar.bz2 |
gdb/testsuite: Handle underlying type in gdb.cp/var-tag.exp.
* gdb.cp/var-tag.exp (do_global_tests): Handle underlying type.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.cp/var-tag.exp | 12 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 56b6cc5..c285612 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2014-05-21 Mark Wielaard <mjw@redhat.com> + + * gdb.cp/var-tag.exp (do_global_tests): Handle underlying type. + 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com> Fix TLS access for -static -pthread. diff --git a/gdb/testsuite/gdb.cp/var-tag.exp b/gdb/testsuite/gdb.cp/var-tag.exp index 7869fa2..9e46282 100644 --- a/gdb/testsuite/gdb.cp/var-tag.exp +++ b/gdb/testsuite/gdb.cp/var-tag.exp @@ -26,19 +26,25 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug c++}]} { } proc do_global_tests {lang} { + if {$lang == "c++"} { + set opt_underlying "(: unsigned int )?" + } else { + set opt_underlying "" + } + if {$lang == "c"} { set invalid_print "No symbol \"%s\" in current context." set ptypefmt $invalid_print } else { set invalid_print "Attempt to use a type name as an expression" - set ptypefmt "type = (class|enum|union|struct) %s {.*}" + set ptypefmt "type = (class|enum|union|struct) %s $opt_underlying{.*}" } with_test_prefix $lang { gdb_test_no_output "set language $lang" gdb_test "ptype C" "type = class C {.*}" gdb_test "print E" "= a" - gdb_test "ptype E" "type = enum E {.*}" + gdb_test "ptype E" "type = enum E $opt_underlying{.*}" gdb_test "print S" "= {<No data fields>}" gdb_test "ptype S" "type = struct S {.*}" gdb_test "print U" "= {.*}" @@ -52,7 +58,7 @@ proc do_global_tests {lang} { gdb_test "print SS" [format $invalid_print "SS"] gdb_test "ptype SS" [format $ptypefmt "SS"] gdb_test "print ee" "= .*" - gdb_test "ptype ee" "type = enum EE {.*}" + gdb_test "ptype ee" "type = enum EE $opt_underlying{.*}" gdb_test "print EE" [format $invalid_print "EE"] gdb_test "ptype EE" [format $ptypefmt "EE"] gdb_test "print uu" "= {.*}" |