OSDN Git Service

Merge branch 'binutils' into tmp
[pf3gnuchains/pf3gnuchains4x.git] / gdb / testsuite / gdb.base / structs.exp
index 1573e72..e68ab6c 100644 (file)
@@ -1,7 +1,7 @@
 # This testcase is part of GDB, the GNU debugger.
 
-# Copyright 1996, 1997, 1999, 2003, 2004, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright 1996-1997, 1999, 2003-2004, 2007-2012 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
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-if $tracelevel then {
-       strace $tracelevel
-}
-
-set prms_id 0
-set bug_id 0
 
 # Some targets can't call functions, so don't even bother with this
 # test.
@@ -91,14 +85,10 @@ proc start_structs_test { types } {
     gdb_load ${binfile}
 
     # Make certain that the output is consistent
-    gdb_test "set print sevenbit-strings" "" \
-           "set print sevenbit-strings; ${testfile}"
-    gdb_test "set print address off" "" \
-           "set print address off; ${testfile}"
-    gdb_test "set width 0" "" \
-           "set width 0; ${testfile}"
-    gdb_test "set print elements 300" "" \
-           "set print elements 300; ${testfile}"
+    gdb_test_no_output "set print sevenbit-strings"
+    gdb_test_no_output "set print address off"
+    gdb_test_no_output "set width 0"
+    gdb_test_no_output "set print elements 300"
 
     # Advance to main
     if { ![runto_main] } then {
@@ -217,17 +207,10 @@ proc I2A { n } {
 
 # Use the file name, compiler and tuples to set up any needed KFAILs.
 
-proc setup_kfails { file tuples bug } {
-    global testfile
-    if [string match $file $testfile] {
-       foreach f $tuples { setup_kfail $f $bug }
-    }
-}
-
 proc setup_compiler_kfails { file compiler format tuples bug } {
     global testfile
     if {[string match $file $testfile] && [test_compiler_info $compiler]  && [test_debug_format $format]} {
-       foreach f $tuples { setup_kfail $f $bug }
+       foreach f $tuples { setup_kfail $bug $f }
     }
 }
 
@@ -270,7 +253,7 @@ proc test_struct_calls { n } {
     # stores its parameter in the global variable "L$N".  GDB then
     # examining that global to confirm that the value is as expected.
 
-    gdb_test "call Fun${n}(foo${n})" "" "call Fun<n>(foo<n>); ${tests}"
+    gdb_test_no_output "call Fun${n}(foo${n})" "call Fun<n>(foo<n>); ${tests}"
     setup_compiler_kfails structs-tc-tll gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
     setup_compiler_kfails structs-tc-td gcc-3-3-* "DWARF 2" i*86-*-* gdb/1455
     gdb_test "p/c L${n}" [foo ${n}] "p/c L<n>; ${tests}"
@@ -313,7 +296,7 @@ proc test_struct_returns { n } {
 
     # The relevant code looks like "L{n} = fun{n}()".  The test forces
     # "fun{n}" to "return" with an explicit value.  Since that code
-    # snippet will store the the returned value in "L{n}" the return
+    # snippet will store the returned value in "L{n}" the return
     # is tested by examining "L{n}".  This assumes that the
     # compiler implemented this as fun{n}(&L{n}) and hence that when
     # the value isn't stored "L{n}" remains unchanged.  Also check for