| Index: gdb/testsuite/gdb.base/enumval.exp
|
| diff --git a/gdb/testsuite/gdb.base/enumval.exp b/gdb/testsuite/gdb.base/enumval.exp
|
| index fa41096a3bd488d572784631de9006d3947b94ff..93e675283d97fd34b3fb7f07bf809483fb65c699 100644
|
| --- a/gdb/testsuite/gdb.base/enumval.exp
|
| +++ b/gdb/testsuite/gdb.base/enumval.exp
|
| @@ -1,6 +1,6 @@
|
| # This testcase is part of GDB, the GNU debugger.
|
|
|
| -# Copyright 2012 Free Software Foundation, Inc.
|
| +# Copyright 2012-2013 Free Software Foundation, Inc.
|
|
|
| # This program is free software; you can redistribute it and/or modify
|
| # it under the terms of the GNU General Public License as published by
|
| @@ -15,17 +15,64 @@
|
| # You should have received a copy of the GNU General Public License
|
| # along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
| -set testfile "enumval"
|
| -set srcfile ${testfile}.c
|
| -set binfile ${objdir}/${subdir}/${testfile}
|
| +standard_testfile
|
|
|
| -if { [prepare_for_testing enumval.exp "enumval" "" {debug}] } {
|
| +if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
|
| + untested $testfile.exp
|
| return -1
|
| }
|
|
|
| # Check the real contents.
|
| -gdb_test "print e" "= J"
|
| -gdb_test "print f" "= K"
|
| +
|
| +set test "print e"
|
| +gdb_test_multiple $test $test {
|
| + -re " = J\r\n$gdb_prompt $" {
|
| + pass $test
|
| + }
|
| + -re " = 4294967295\r\n$gdb_prompt $" {
|
| + if {[test_compiler_info {gcc-[0-3]-*}]
|
| + || [test_compiler_info {gcc-4-[0-6]-*}]} {
|
| + xfail $test
|
| + } else {
|
| + fail $test
|
| + }
|
| + }
|
| +}
|
| +
|
| +set test "print f"
|
| +gdb_test_multiple $test $test {
|
| + -re " = K\r\n$gdb_prompt $" {
|
| + pass $test
|
| + }
|
| + -re " = -1152921504606846976\r\n$gdb_prompt $" {
|
| + if {[test_compiler_info {gcc-[0-3]-*}]
|
| + || [test_compiler_info {gcc-4-[0-6]-*}]} {
|
| + xfail $test
|
| + } else {
|
| + fail $test
|
| + }
|
| + }
|
| +}
|
|
|
| gdb_test "print J" "= J"
|
| -gdb_test "print K" "= K"
|
| +
|
| +set test "print K"
|
| +gdb_test_multiple $test $test {
|
| + -re " = K\r\n$gdb_prompt $" {
|
| + pass $test
|
| + }
|
| + -re " = <optimized out>\r\n$gdb_prompt $" {
|
| + if {[test_compiler_info {gcc-[0-3]-*}]
|
| + || [test_compiler_info {gcc-4-[0-6]-*}]} {
|
| + xfail $test
|
| + } else {
|
| + fail $test
|
| + }
|
| + }
|
| +}
|
| +
|
| +# gold/15021
|
| +# With -fdebug-types-section, Gold's .gdb_index entry for ZERO refers to the
|
| +# CU, but the CU doesn't use the TU (type unit) that defines ZERO.
|
| +# Thus gdb has to read in every TU for the CU.
|
| +gdb_test "p ZERO" "ZERO"
|
|
|