daily update
[external/binutils.git] / gdb / testsuite / gdb.base / funcargs.exp
index fa79b67..1cf3e9d 100644 (file)
@@ -1,21 +1,18 @@
-# Copyright (C) 1992, 1994, 1995, 1997 Free Software Foundation, Inc.
+# Copyright 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004,
+# 2007, 2008, 2009 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
-# the Free Software Foundation; either version 2 of the License, or
+# the Free Software Foundation; either version 3 of the License, or
 # (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  
-
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
@@ -30,8 +27,8 @@ set testfile "funcargs"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    perror "Couldn't compile ${srcfile}"
-    return -1
+     untested funcargs.exp
+     return -1
 }
 
 # Create and source the file that provides information about the compiler
@@ -58,9 +55,6 @@ proc integral_args {} {
     gdb_breakpoint call0e
 
     # Run; should stop at call0a and print actual arguments.
-    # The a29k fails all of these tests, perhaps because the prologue
-    # code is broken.
-    setup_xfail "a29k-*-udi"
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
     gdb_run_cmd
     gdb_expect {
@@ -118,9 +112,6 @@ proc unsigned_integral_args {} {
     gdb_breakpoint call1e;
 
     # Run; should stop at call1a and print actual arguments.
-    # The a29k fails all of these tests, perhaps because the prologue
-    # code is broken.
-    setup_xfail "a29k-*-udi"
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
     gdb_run_cmd
     gdb_expect {
@@ -182,14 +173,11 @@ proc float_and_integral_args {} {
 
     # Run; should stop at call2a and print actual arguments.
 
-    setup_xfail "i960-*-*" 1813
-    # The a29k fails all of these tests, perhaps because the prologue
-    # code is broken.
-    setup_xfail "a29k-*-udi"
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
     gdb_run_cmd
     gdb_expect {
         -re ".* call2a \\(c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" { pass "run to call2a" }
+        -re ".* call2a \\(c=97 'a', f1=.*, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" { xfail "run to call2a" }
         -re "$gdb_prompt $" { fail "run to call2a" ; gdb_suppress_tests; }
         timeout { fail "(timeout) run to call2a" ; gdb_suppress_tests; }
     }
@@ -271,12 +259,9 @@ proc pointer_args {} {
     # Run; should stop at call3a and print actual arguments.
     # Try dereferencing the arguments.
 
-    # The a29k fails all of these tests, perhaps because the prologue
-    # code is broken.
-    setup_xfail "a29k-*-udi"
     gdb_run_cmd
     gdb_expect {
-        -re ".* call3a \\(cp=$hex \"a\", sp=$hex, ip=$hex, lp=$hex\\) .*$gdb_prompt $" { pass "run to call3a" }
+        -re ".* call3a \\(cp=$hex \"a.*\", sp=$hex, ip=$hex, lp=$hex\\) .*$gdb_prompt $" { pass "run to call3a" }
         -re "$gdb_prompt $" { fail "run to call3a" ; gdb_suppress_tests; }
         timeout { fail "(timeout) run to call3a" ; gdb_suppress_tests; }
     }
@@ -288,7 +273,7 @@ proc pointer_args {} {
 
     # Continue; should stop at call3b and print actual arguments.
     # Try dereferencing the arguments.
-    if [gdb_test "cont" ".* call3b \\(ucp=$hex \"b\", usp=$hex, uip=$hex, ulp=$hex\\) .*" "continue to call3b"] {
+    if [gdb_test "cont" ".* call3b \\(ucp=$hex \"b.*\", usp=$hex, uip=$hex, ulp=$hex\\) .*" "continue to call3b"] {
        gdb_suppress_tests;
     }
 
@@ -318,6 +303,9 @@ proc structs_by_reference {} {
     global gdb_prompt
     global hex
     global det_file
+    global target_sizeof_int
+    global target_sizeof_long
+    global target_bigendian_p
 
     delete_breakpoints
 
@@ -327,9 +315,6 @@ proc structs_by_reference {} {
     # Run; should stop at call4a and print actual arguments.
     # Try dereferencing the arguments.
 
-    # The a29k fails all of these tests, perhaps because the prologue
-    # code is broken.
-    setup_xfail "a29k-*-udi"
     gdb_run_cmd
     gdb_expect {
         -re ".* call4a \\(stp=$hex\\) .*$gdb_prompt $" {
@@ -342,15 +327,25 @@ proc structs_by_reference {} {
     gdb_test "print *stp" ".* = \{s1 = 101, s2 = 102\}"
 
     # Continue; should stop at call4b and print actual arguments.
-    # Try dereferencing the arguments.
 
     gdb_test "cont" ".* call4b \\(unp=$hex\\) .*" "continue to call4b"
 
-    # sizeof int != sizeof long
-    if [target_info exists gdb,short_int] {
-       setup_xfail "*-*-*"
+    # Try dereferencing the arguments.
+    if { $target_sizeof_long == $target_sizeof_int } {
+       gdb_test "print *unp" ".* = \{u1 = 1, u2 = 1\}" \
+               "print *unp (sizeof long == sizeof int)"
+    } elseif { ! $target_bigendian_p } {
+       gdb_test "print *unp" ".* = \{u1 = 1, u2 = 1\}" \
+               "print *unp (little-endian, sizeof long != sizeof int)"
+    } elseif { $target_sizeof_long == 8 && $target_sizeof_int == 4 } {
+       gdb_test "print *unp" ".* = \{u1 = 1, u2 = 4294967296\}" \
+               "print *unp (big-endian, sizeof long == 8, sizeof int = 4)"
+    } elseif { $target_sizeof_long == 4 && $target_sizeof_int == 2 } {
+       gdb_test "print *unp" ".* = \{u1 = 1, u2 = 65536\}" \
+               "print *unp (big-endian, sizeof long == 4, sizeof int = 2)"
+    } else {
+       fail "print *unp (unknown case)"
     }
-    gdb_test "print *unp" ".* = \{u1 = 1, u2 = 1\}"
 
     pass "locate actual args, structs/unions passed by reference"
     gdb_stop_suppressing_tests;
@@ -364,6 +359,9 @@ proc structs_by_value {} {
     global gdb_prompt
     global hex
     global det_file
+    global target_sizeof_int
+    global target_sizeof_long
+    global target_bigendian_p
 
     delete_breakpoints
 
@@ -373,9 +371,6 @@ proc structs_by_value {} {
     # Run; should stop at call5a and print actual arguments.
     # Try dereferencing the arguments.
 
-    # The a29k fails all of these tests, perhaps because the prologue
-    # code is broken.
-    setup_xfail "a29k-*-udi"
     gdb_run_cmd
     gdb_expect {
         -re ".* call5a \\(st=\{s1 = 101, s2 = 102\}\\) .*$gdb_prompt $" {
@@ -388,19 +383,39 @@ proc structs_by_value {} {
     gdb_test "print st" ".* = \{s1 = 101, s2 = 102\}"
 
     # Continue; should stop at call5b and print actual arguments.
-    # Try dereferencing the arguments.
-    # sizeof int != sizeof long
-    if [target_info exists gdb,short_int] {
-       setup_xfail "*-*-*"
+    if { $target_sizeof_long == $target_sizeof_int } {
+       gdb_test "cont" ".* call5b \\(un=\{u1 = 2, u2 = 2\}\\) .*" \
+               "continue to call5b (sizeof long == sizeof int)"
+    } elseif { ! $target_bigendian_p } {
+       gdb_test "cont" ".* call5b \\(un=\{u1 = 2, u2 = 2\}\\) .*" \
+               "continue to call5b (little-endian, sizeof long != sizeof int)"
+    } elseif { $target_sizeof_long == 8 && $target_sizeof_int == 4 } {
+       gdb_test "cont" ".* call5b \\(un=\{u1 = 2, u2 = 8589934592\}\\) .*" \
+               "continue to call5b (big-endian, sizeof long == 8, sizeof int = 4)"
+    } elseif { $target_sizeof_long == 4 && $target_sizeof_int == 2 } {
+       gdb_test "cont" ".* call5b \\(un=\{u1 = 2, u2 = 131072\}\\) .*" \
+               "continue to call5b (big-endian, sizeof long == 4, sizeof int = 2)"
+    } else {
+       fail "continue to call5b (unknown case)"
     }
-    gdb_test "cont" ".* call5b \\(un=\{u1 = 2, u2 = 2\}\\) .*" \
-           "continue to call5b"
 
-    # sizeof int != sizeof long
-    if [target_info exists gdb,short_int] {
-       setup_xfail "*-*-*"
+    # Try dereferencing the arguments.
+    if { $target_sizeof_long == $target_sizeof_int } {
+       gdb_test "print un" ".* = \{u1 = 2, u2 = 2\}" \
+               "print un (sizeof long == sizeof int)"
+    } elseif { ! $target_bigendian_p } {
+       gdb_test "print un" ".* = \{u1 = 2, u2 = 2\}" \
+               "print un (little-endian, sizeof long != sizeof int)"
+    } elseif { $target_sizeof_long == 8 && $target_sizeof_int == 4 } {
+       gdb_test "print un" ".* = \{u1 = 2, u2 = 8589934592\}" \
+               "print un (big-endian, sizeof long == 8, sizeof int = 4)"
+    } elseif { $target_sizeof_long == 4 && $target_sizeof_int == 2 } {
+       gdb_test "print un" ".* = \{u1 = 2, u2 = 131072\}" \
+               "print un (big-endian, sizeof long == 4, sizeof int = 2)"
+    } else {
+       fail "print un (unknown case)"
     }
-    gdb_test "print un" ".* = \{u1 = 2, u2 = 2\}"
+
     gdb_stop_suppressing_tests;
 }
 
@@ -429,9 +444,6 @@ proc discard_and_shuffle {} {
     # Run; should stop at call6a and print actual arguments.
     # Print backtrace.
 
-    # The a29k fails all of these tests, perhaps because the prologue
-    # code is broken.
-    setup_xfail "a29k-*-udi"
     gdb_run_cmd
     gdb_expect {
         -re ".*Breakpoint $decimal, call6a .*$gdb_prompt $" { pass "run to call6a" }
@@ -445,8 +457,28 @@ proc discard_and_shuffle {} {
        setup_xfail "mips-sgi-irix5*"
     }
 
-    if [gdb_test "backtrace 100" ".* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\]" "backtrace from call6a"] {
-       gdb_suppress_tests;
+    send_gdb "backtrace 100\n"
+    gdb_expect {
+       -re "backtrace 100\[\r\n\]+
+.* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\r
+.* main \\(.*\\) .*\r
+$gdb_prompt $" {
+           pass "backtrace from call6a"
+       }
+       -re "backtrace 100\[\r\n\]+
+.* call6a \\(c=97 'a', s=1, i=2, l=3, f=.*, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\r
+.* main \\(.*\\) .*\r
+$gdb_prompt $" {
+           xfail "backtrace from call6a"
+       }
+       -re "$gdb_prompt $" {
+           fail "backtrace from call6a"
+           gdb_suppress_tests
+       }
+       timeout {
+           fail "(timeout) backtrace from call6a"
+           gdb_suppress_tests
+       }
     }
 
     # Continue; should stop at call6b and print actual arguments.
@@ -454,7 +486,12 @@ proc discard_and_shuffle {} {
 
     gdb_continue call6b
 
-    if [gdb_test "backtrace 100" ".* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\]*.* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\]" "backtrace from call6b"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6b" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#1 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#2 .* main \\(.*\\) " 
+    } ] {
        gdb_suppress_tests;
     }
 
@@ -463,7 +500,13 @@ proc discard_and_shuffle {} {
 
     gdb_continue call6c
 
-    if [gdb_test "backtrace 100" ".* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n].* main \\(.*\\) .*" "backtrace from call6c"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6c" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#1 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#2 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#3 .* main \\(.*\\) "
+    } ] {
        gdb_suppress_tests;
     }
     # Continue; should stop at call6d and print actual arguments.
@@ -471,7 +514,14 @@ proc discard_and_shuffle {} {
 
     gdb_continue call6d
 
-    if [gdb_test "backtrace 100" ".* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n].* main \\(.*\\) .*" "backtrace from call6d"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6d" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#1 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#2 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#3 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#4 .* main \\(.*\\) "
+    } ] {
        gdb_suppress_tests;
     }
 
@@ -480,7 +530,15 @@ proc discard_and_shuffle {} {
 
     gdb_continue call6e
 
-    if [gdb_test "backtrace 100" ".* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n].* main \\(.*\\) .*" "backtrace from call6e"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6e" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#1 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#2 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#3 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#4 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#5 .* main \\(.*\\) "
+    } ] {
        gdb_suppress_tests;
     }
 
@@ -489,7 +547,16 @@ proc discard_and_shuffle {} {
 
     gdb_continue call6f
 
-    if [gdb_test "backtrace 100" ".* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n].* main \\(.*\\) .*" "backtrace from call6f"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6f" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#1 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#2 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#3 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#4 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#5 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#6 .* main \\(.*\\) "
+    } ] {
        gdb_suppress_tests;
     }
 
@@ -498,7 +565,17 @@ proc discard_and_shuffle {} {
 
     gdb_continue call6g
 
-    if [gdb_test "backtrace 100" ".* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n].* main \\(.*\\) .*" "backtrace from call6g"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6g" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#1 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#2 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#3 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#4 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#5 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#6 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#7 .* main \\(.*\\) "
+    } ] {
        gdb_suppress_tests;
     }
 
@@ -507,7 +584,18 @@ proc discard_and_shuffle {} {
 
     gdb_continue call6h
 
-    if [gdb_test "backtrace 100" ".* call6h \\(us=6, ui=7, ul=8\\) .*\[\r\n\].* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n].* main \\(.*\\) .*" "backtrace from call6h"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6h" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6h \\(us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#1 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#2 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#3 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#4 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#5 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#6 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#7 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#8 .* main \\(.*\\) "
+    } ] {
        gdb_suppress_tests;
     }
 
@@ -523,7 +611,19 @@ proc discard_and_shuffle {} {
 
     gdb_continue call6i
 
-    if [gdb_test "backtrace 100" ".* call6i \\(ui=7, ul=8\\) .*\[\r\n\].* call6h \\(us=6, ui=7, ul=8\\) .*\[\r\n\].* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n].* main \\(.*\\) .*" "backtrace from call6i"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6i" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6i \\(ui=7, ul=8\\) "
+       ".*\[\r\n\]#1 .* call6h \\(us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#2 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#3 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#4 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#5 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#6 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#7 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#8 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#9 .* main \\(.*\\) "
+    } ] {
        gdb_suppress_tests;
     }
 
@@ -532,18 +632,42 @@ proc discard_and_shuffle {} {
 
     gdb_continue call6j
 
-    if [gdb_test "backtrace 100" ".* call6j \\(ul=8\\) .*\[\r\n\].* call6i \\(ui=7, ul=8\\) .*\[\r\n\].* call6h \\(us=6, ui=7, ul=8\\) .*\[\r\n\].* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n].* main \\(.*\\) .*" "backtrace from call6j"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6j" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6j \\(ul=8\\) "
+       ".*\[\r\n\]#1 .* call6i \\(ui=7, ul=8\\) "
+       ".*\[\r\n\]#2 .* call6h \\(us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#3 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#4 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#5 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#6 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#7 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#8 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#9 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#10 .* main \\(.*\\) "
+    } ] {
        gdb_suppress_tests;
     }
 
     # Continue; should stop at call6k and print actual arguments.
     # Print backtrace.
-    # This fails on i960-*-vxworks because gdb gets confused by
-    # breakpoints on adjacent instructions.
-    setup_xfail "i960-*-vxworks" 1786
     gdb_continue call6k
 
-    if [gdb_test "backtrace 100" ".* call6k \\(\\) .*\[\r\n\].* call6j \\(ul=8\\) .*\[\r\n\].* call6i \\(ui=7, ul=8\\) .*\[\r\n\].* call6h \\(us=6, ui=7, ul=8\\) .*\[\r\n\].* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n\].* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .*\[\r\n].* main \\(.*\\) .*" "backtrace from call6k"] {
+    send_gdb "backtrace 100\n"
+    if [gdb_expect_list "backtrace from call6k" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call6k \\(\\) "
+       ".*\[\r\n\]#1 .* call6j \\(ul=8\\) "
+       ".*\[\r\n\]#2 .* call6i \\(ui=7, ul=8\\) "
+       ".*\[\r\n\]#3 .* call6h \\(us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#4 .* call6g \\(uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#5 .* call6f \\(d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#6 .* call6e \\(f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#7 .* call6d \\(l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#8 .* call6c \\(i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#9 .* call6b \\(s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#10 .* call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) "
+       ".*\[\r\n\]#11 .* main \\(.*\\) "
+    } ] {
        gdb_suppress_tests;
     }
     gdb_stop_suppressing_tests;
@@ -575,9 +699,6 @@ proc shuffle_round_robin {} {
     # Run; should stop at call7a and print actual arguments.
     # Print backtrace.
 
-    # The a29k fails all of these tests, perhaps because the prologue
-    # code is broken.
-    setup_xfail "a29k-*-udi"
     gdb_run_cmd
     gdb_expect {
         -re ".*Breakpoint $decimal, call7a .*$gdb_prompt $" {
@@ -587,9 +708,24 @@ proc shuffle_round_robin {} {
         timeout { fail "(timeout) run to call7a" ; gdb_suppress_tests; }
     }
 
-    setup_xfail "i960-*-*" 1813
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
-    gdb_test "backtrace 100" ".* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7a"
+    send_gdb "backtrace 100\n"
+    gdb_expect {
+       -re "backtrace 100\[\r\n\]+
+.* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\r
+.* main \\(.*\\) .*\r
+$gdb_prompt $" {
+           pass "backtrace from call7a"
+       }
+       -re "backtrace 100\[\r\n\]+
+.* call7a \\(c=97 'a', i=2, s=1, l=3, f=.*, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\r
+.* main \\(.*\\) .*\r
+$gdb_prompt $" {
+           xfail "backtrace from call7a"
+       }
+       -re "$gdb_prompt $" { fail "backtrace from call7a" ; return }
+       timeout { fail "(timeout) backtrace from call7a" ; return }
+    }
 
     # Continue; should stop at call7b and print actual arguments.
     # Print backtrace.
@@ -598,43 +734,99 @@ proc shuffle_round_robin {} {
 
     if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
 
-    gdb_test "backtrace 100" ".* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7b"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7b" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#1 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#2 .* main \\(.*\\) "
+    }
 
     # Continue; should stop at call7c and print actual arguments.
     # Print backtrace.
 
     gdb_continue call7c
 
-    gdb_test "backtrace 100" ".* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) .*\[\r\n\].* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7c"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7c" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+       ".*\[\r\n\]#1 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#2 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#3 .* main \\(.*\\) "
+    }
 
     # Continue; should stop at call7d and print actual arguments.
     # Print backtrace.
 
     gdb_continue call7d
 
-    gdb_test "backtrace 100" ".* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) .*\[\r\n\].* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) .*\[\r\n\].* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7d"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7d" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+       ".*\[\r\n\]#1 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+       ".*\[\r\n\]#2 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#3 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#4 .* main \\(.*\\) "
+    }
 
     gdb_continue call7e
 
-    gdb_test "backtrace 100" ".* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) .*\[\r\n\].* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) .*\[\r\n\].* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) .*\[\r\n\].* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7e"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7e" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+       ".*\[\r\n\]#1 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+       ".*\[\r\n\]#2 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+       ".*\[\r\n\]#3 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#4 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#5 .* main \\(.*\\) "
+    }
 
     # Continue; should stop at call7f and print actual arguments.
     # Print backtrace.
 
     gdb_continue call7f
 
-    gdb_test "backtrace 100" ".* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) .*\[\r\n\].* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) .*\[\r\n\].* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) .*\[\r\n\].* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) .*\[\r\n\].* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7f"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7f" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+       ".*\[\r\n\]#1 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+       ".*\[\r\n\]#2 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+       ".*\[\r\n\]#3 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+       ".*\[\r\n\]#4 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#5 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#6 .* main \\(.*\\) "
+    }
 
     # Continue; should stop at call7g and print actual arguments.
     # Print backtrace.
 
     gdb_continue call7g
 
-    gdb_test "backtrace 100" ".* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) .*\[\r\n\].* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) .*\[\r\n\].* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) .*\[\r\n\].* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) .*\[\r\n\].* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) .*\[\r\n\].* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7g"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7g" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+       ".*\[\r\n\]#1 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+       ".*\[\r\n\]#2 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+       ".*\[\r\n\]#3 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+       ".*\[\r\n\]#4 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+       ".*\[\r\n\]#5 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#6 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#7 .* main \\(.*\\) "
+    }
 
     gdb_continue call7h
 
-    gdb_test "backtrace 100" ".* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) .*\[\r\n\].* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) .*\[\r\n\].* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) .*\[\r\n\].* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) .*\[\r\n\].* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) .*\[\r\n\].* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) .*\[\r\n\].* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7h"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7h" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
+       ".*\[\r\n\]#1 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+       ".*\[\r\n\]#2 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+       ".*\[\r\n\]#3 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+       ".*\[\r\n\]#4 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+       ".*\[\r\n\]#5 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+       ".*\[\r\n\]#6 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#7 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#8 .* main \\(.*\\) "
+    }
 
     # monitor only allows 8 breakpoints; w89k board allows 10, so
     # break them up into two groups.
@@ -648,14 +840,39 @@ proc shuffle_round_robin {} {
 
     gdb_continue call7i
 
-    gdb_test "backtrace 100" ".* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) .*\[\r\n\].* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) .*\[\r\n\].* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) .*\[\r\n\].* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) .*\[\r\n\].* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) .*\[\r\n\].* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) .*\[\r\n\].* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) .*\[\r\n\].* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7i"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7i" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) "
+       ".*\[\r\n\]#1 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
+       ".*\[\r\n\]#2 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+       ".*\[\r\n\]#3 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+       ".*\[\r\n\]#4 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+       ".*\[\r\n\]#5 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+       ".*\[\r\n\]#6 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+       ".*\[\r\n\]#7 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#8 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#9 .* main \\(.*\\) "
+    }
 
     # Continue; should stop at call7j and print actual arguments.
     # Print backtrace.
 
     gdb_continue call7j
 
-    gdb_test "backtrace 100" ".* call7j \\(ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8\\) .*\[\r\n\].* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) .*\[\r\n\].* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) .*\[\r\n\].* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) .*\[\r\n\].* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) .*\[\r\n\].* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) .*\[\r\n\].* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) .*\[\r\n\].* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) .*\[\r\n\].* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7j"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7j" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7j \\(ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8\\) "
+       ".*\[\r\n\]#1 .* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) "
+       ".*\[\r\n\]#2 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
+       ".*\[\r\n\]#3 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+       ".*\[\r\n\]#4 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+       ".*\[\r\n\]#5 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+       ".*\[\r\n\]#6 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+       ".*\[\r\n\]#7 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+       ".*\[\r\n\]#8 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#9 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#10 .* main \\(.*\\) "
+    }
 
     # Continue; should stop at call7k and print actual arguments.
     # Print backtrace.
@@ -663,7 +880,21 @@ proc shuffle_round_robin {} {
     gdb_continue call7k
 
     if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix*" }
-    gdb_test "backtrace 100" ".* call7k \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* call7j \\(ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8\\) .*\[\r\n\].* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) .*\[\r\n\].* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) .*\[\r\n\].* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) .*\[\r\n\].* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) .*\[\r\n\].* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) .*\[\r\n\].* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) .*\[\r\n\].* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) .*\[\r\n\].* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) .*\[\r\n\].* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\].*" "backtrace from call7k"
+    send_gdb "backtrace 100\n"
+    gdb_expect_list "backtrace from call7k" ".*$gdb_prompt $" {
+       ".*\[\r\n\]#0 .* call7k \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#1 .* call7j \\(ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8\\) "
+       ".*\[\r\n\]#2 .* call7i \\(ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6\\) "
+       ".*\[\r\n\]#3 .* call7h \\(us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5\\) "
+       ".*\[\r\n\]#4 .* call7g \\(d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b'\\) "
+       ".*\[\r\n\]#5 .* call7f \\(uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3, f=4\\) "
+       ".*\[\r\n\]#6 .* call7e \\(f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1, l=3\\) "
+       ".*\[\r\n\]#7 .* call7d \\(l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2, s=1\\) "
+       ".*\[\r\n\]#8 .* call7c \\(s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a', i=2\\) "
+       ".*\[\r\n\]#9 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
+       ".*\[\r\n\]#10 .* call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) "
+       ".*\[\r\n\]#11 .* main \\(.*\\) "
+    }
     gdb_stop_suppressing_tests;
 }
 
@@ -691,10 +922,17 @@ proc recursive_structs_by_value {} {
     }
 
     if ![istarget sparclet-*-*] {
-    # The a29k fails all of these tests, perhaps because the prologue
-    # code is broken.
-       setup_xfail "a29k-*-udi"
-       gdb_test "backtrace 100" ".* hitbottom \\(\\) .*\[\r\n\].* recurse \\(a=\{s = 0, i = 0, l = 0\}, depth=0\\) .*\[\r\n\].* recurse \\(a=\{s = 1, i = 1, l = 1\}, depth=1\\) .*\[\r\n\].* recurse \\(a=\{s = 2, i = 2, l = 2\}, depth=2\\) .*\[\r\n\].* recurse \\(a=\{s = 3, i = 3, l = 3\}, depth=3\\) .*\[\r\n\].* recurse \\(a=\{s = 4, i = 4, l = 4\}, depth=4\\) .*\[\r\n\].* test_struct_args \\(\\) .*\[\r\n\].* main \\(.*\\) .*\[\r\n\]" "recursive passing of structs by value"
+       send_gdb "backtrace 100\n"
+       gdb_expect_list "recursive passing of structs by value" ".*$gdb_prompt $" {
+           ".*\[\r\n\]#0 .* hitbottom \\(\\) "
+           ".*\[\r\n\]#1 .* recurse \\(a=\{s = 0, i = 0, l = 0\}, depth=0\\) "
+           ".*\[\r\n\]#2 .* recurse \\(a=\{s = 1, i = 1, l = 1\}, depth=1\\) "
+           ".*\[\r\n\]#3 .* recurse \\(a=\{s = 2, i = 2, l = 2\}, depth=2\\) "
+           ".*\[\r\n\]#4 .* recurse \\(a=\{s = 3, i = 3, l = 3\}, depth=3\\) "
+           ".*\[\r\n\]#5 .* recurse \\(a=\{s = 4, i = 4, l = 4\}, depth=4\\) "
+           ".*\[\r\n\]#6 .* test_struct_args \\(\\) "
+           ".*\[\r\n\]#7 .* main \\(.*\\) "
+       }
     } else {
        fail "recursive passing of structs by value (sparclet)"
     }
@@ -824,10 +1062,12 @@ proc localvars_in_indirect_call { } {
     send_gdb "finish\n"
     gdb_expect {
         -re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*First.*$gdb_prompt $" {
+#On hppa2.0w-hp-hpux11.00, gdb finishes at one line earlier than 
+#hppa1.1-hp-hpux11.00. Therefore, an extra "step" is necessary to continue the test.
            send_gdb "step\n"
            exp_continue
        }
-        -re "\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*Second.*$gdb_prompt $" {
+        -re ".*\\(\\*pointer_to_call0a\\) \\(c, s, i, l\\);.*Second.*$gdb_prompt $" {
            pass "finish from indirectly called function"
        }
         -re ".*$gdb_prompt $" {
@@ -843,7 +1083,6 @@ proc localvars_in_indirect_call { } {
     gdb_stop_suppressing_tests;
 }
 
-# Start with a fresh gdb.
 #
 # Test for stepping into indirect calls which may have trampolines (possibly
 # cascaded) on both the call path and the gdb_suppress_tests; path.
@@ -888,7 +1127,8 @@ proc test_stepping_over_trampolines { } {
     send_gdb "step\n"
     gdb_expect {
         -re "main .* at.*$gdb_prompt $" {
-           pass "stepping back to main from function called with trampolines" ;
+            pass "stepping back to main from function called with trampolines" ;
+            gdb_suppress_tests
        }
         -re "\}.*End of call_with_trampolines.*$gdb_prompt $" {
            send_gdb "step\n"
@@ -909,13 +1149,58 @@ gdb_start
 gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 
-set timeout 60
+if [istarget "mips*tx39-*"] {
+    set timeout 300
+} else {
+    set timeout 60
+}
+
+# Determine expected output for unsigned long variables,
+# the output varies with sizeof (unsigned long).
+
+set target_sizeof_long 4
+send_gdb "print sizeof (long)\n"
+gdb_expect {
+    -re ".\[0-9\]* = 4.*$gdb_prompt $" { }
+    -re ".\[0-9\]* = 8.*$gdb_prompt $" { set target_sizeof_long 8 } 
+    -re ".*$gdb_prompt $" {
+        fail "getting sizeof long"
+    }
+    default    { fail "(timeout) getting sizeof long" }
+}
+
+set target_sizeof_int 4
+send_gdb "print sizeof (int)\n"
+gdb_expect {
+    -re ".\[0-9\]* = 2.*$gdb_prompt $" { set target_sizeof_int 2 }
+    -re ".\[0-9\]* = 4.*$gdb_prompt $" { }
+    -re ".\[0-9\]* = 8.*$gdb_prompt $" { set target_sizeof_int 8 } 
+    -re ".*$gdb_prompt $" {
+        fail "getting sizeof unsigned long"
+    }
+    default    { fail "(timeout) getting sizeof int" }
+}
+
+set target_bigendian_p 1
+send_gdb "show endian\n"
+gdb_expect {
+    -re ".*little endian.*$gdb_prompt $" { set target_bigendian_p 0 }
+    -re ".*big endian.*$gdb_prompt $" { }
+    -re ".*$gdb_prompt $" {
+        fail "getting target endian"
+    }
+    default    { fail "(timeout) getting target endian" }
+}
+
+# Perform tests
 
 integral_args
 funcargs_reload
 unsigned_integral_args
 funcargs_reload
-float_and_integral_args
+if {![target_info exists gdb,skip_float_tests]} {
+  float_and_integral_args
+}
 funcargs_reload
 pointer_args
 funcargs_reload