+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.
}
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" "= {.*}"
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" "= {.*}"