Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Unified Diff: gdb/testsuite/gdb.base/enumval.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/enumval.c ('k') | gdb/testsuite/gdb.base/environ.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"
« no previous file with comments | « gdb/testsuite/gdb.base/enumval.c ('k') | gdb/testsuite/gdb.base/environ.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698