Imported Upstream version 7.9
[platform/upstream/gdb.git] / gdb / testsuite / gdb.base / funcargs.exp
index 5f1a81c..6cafc99 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright 1992, 1994-2000, 2002-2004, 2007-2012 Free Software
-# Foundation, Inc.
+# Copyright 1992-2015 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
 # This file was written by Fred Fish. (fnf@cygnus.com)
 
 
-set testfile "funcargs"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile
 
 set compile_flags {debug nowarnings quiet}
 if [support_complex_tests] {
     lappend compile_flags "additional_flags=-DTEST_COMPLEX"
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $compile_flags] != "" } {
-     untested funcargs.exp
-     return -1
-}
-
 # Create and source the file that provides information about the compiler
 # used to compile the test case.
 if [get_compiler_info] {
-    return -1;
+    return -1
+}
+
+if {[prepare_for_testing $testfile.exp $testfile $srcfile $compile_flags]} {
+    untested $testfile.exp
+    return -1
 }
 
 #
@@ -57,13 +54,7 @@ proc integral_args {} {
     # Run; should stop at call0a and print actual arguments.
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
     gdb_run_cmd
-    gdb_expect {
-        -re ".* call0a \\(c=97 'a', s=1, i=2, l=3\\) .*$gdb_prompt $" {
-           pass "run to call0a"
-       }
-        -re "$gdb_prompt $"  { fail "run to call0a" ; gdb_suppress_tests }
-        timeout { fail "(timeout) run to call0a" ; gdb_suppress_tests }
-    }
+    gdb_test "" " call0a \\(c=97 'a', s=1, i=2, l=3\\) .*" "run to call0a"
 
     # Print each arg as a double check to see if we can print
     # them here as well as with backtrace.
@@ -74,24 +65,24 @@ proc integral_args {} {
 
     # Continue; should stop at call0b and print actual arguments.
     if [gdb_test "cont" ".* call0b \\(s=1, i=2, l=3, c=97 'a'\\) .*" "continue to call0b"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call0c and print actual arguments.
     if [gdb_test "cont" ".* call0c \\(i=2, l=3, c=97 'a', s=1\\) .*" "continue to call0c"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call0d and print actual arguments.
     if [gdb_test "cont" ".* call0d \\(l=3, c=97 'a', s=1, i=2\\) .*" "continue to call0d";] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call0e and print actual arguments.
     if [gdb_test "cont" ".* call0e \\(c1=97 'a', l=3, c2=97 'a', i=2, c3=97 'a', s=1, c4=97 'a', c5=97 'a'\\) .*" "continue to call0e" ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 #
@@ -105,22 +96,16 @@ proc unsigned_integral_args {} {
 
     delete_breakpoints
 
-    gdb_breakpoint call1a;
-    gdb_breakpoint call1b;
-    gdb_breakpoint call1c;
-    gdb_breakpoint call1d;
-    gdb_breakpoint call1e;
+    gdb_breakpoint call1a
+    gdb_breakpoint call1b
+    gdb_breakpoint call1c
+    gdb_breakpoint call1d
+    gdb_breakpoint call1e
 
     # Run; should stop at call1a and print actual arguments.
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
     gdb_run_cmd
-    gdb_expect {
-        -re ".* call1a \\(uc=98 'b', us=6, ui=7, ul=8\\) .*$gdb_prompt $" {
-           pass "run to call1a"
-       }
-        -re "$gdb_prompt $" { fail "run to call1a" ; gdb_suppress_tests; }
-        timeout { fail "(timeout) run to call1a" ; gdb_suppress_tests; }
-    }
+    gdb_test "" " call1a \\(uc=98 'b', us=6, ui=7, ul=8\\) .*" "run to call1a"
 
     # Print each arg as a double check to see if we can print
     # them here as well as with backtrace.
@@ -131,24 +116,24 @@ proc unsigned_integral_args {} {
     
     # Continue; should stop at call1b and print actual arguments.
     if [gdb_test "cont" ".* call1b \\(us=6, ui=7, ul=8, uc=98 'b'\\) .*" "continue to call1b"] {
-       gdb_suppress_tests
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call1c and print actual arguments.
     if [gdb_test "cont" ".* call1c \\(ui=7, ul=8, uc=98 'b', us=6\\) .*" "continue to call1c"] {
-       gdb_suppress_tests
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call1d and print actual arguments.
     if [gdb_test "cont" ".* call1d \\(ul=8, uc=98 'b', us=6, ui=7\\) .*" "continue to call1d"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call1e and print actual arguments.
     if [gdb_test "cont" ".* call1e \\(uc1=98 'b', ul=8, uc2=98 'b', ui=7, uc3=98 'b', us=6, uc4=98 'b', uc5=98 'b'\\) .*" "continue to call1e"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 #
@@ -173,13 +158,16 @@ proc float_and_integral_args {} {
 
     # Run; should stop at call2a and print actual arguments.
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
+    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
     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; }
+    set test "run to call2a"
+    gdb_test_multiple "" $test {
+        -re ".* call2a \\(c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" {
+            pass $test
+        }
+        -re ".* call2a \\(c=97 'a', f1=.*, s=1, d1=5, i=2, f2=4, l=3, d2=5\\) .*$gdb_prompt $" {
+            xfail $test
+        }
     }
 
     # Print each arg as a double check to see if we can print
@@ -193,40 +181,39 @@ proc float_and_integral_args {} {
     gdb_test "print d2" ".* = 5" "print d2 after run to call2a"
 
     setup_xfail "rs6000-*-*"
-    if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix*" }
     # Continue; should stop at call2b and print actual arguments.
     if [gdb_test "cont" ".* call2b \\(f1=4, s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a'\\) .*" "continue to call2b"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call2c and print actual arguments.
     if [gdb_test "cont" ".* call2c \\(s=1, d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4\\) .*" "continue to call2c"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call2d and print actual arguments.
     if [gdb_test "cont" ".* call2d \\(d1=5, i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1\\) .*" "continue to call2d"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call2e and print actual arguments.
     if [gdb_test "cont" ".* call2e \\(i=2, f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5\\) .*" "continue to call2e"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call2f and print actual arguments.
     if [gdb_test "cont" ".* call2f \\(f2=4, l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2\\) .*" "continue to call2f"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call2g and print actual arguments.
     if [gdb_test "cont" ".* call2g \\(l=3, d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4\\) .*" "continue to call2g"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call2h and print actual arguments.
     if [gdb_test "cont" ".* call2h \\(d2=5, c=97 'a', f1=4, s=1, d1=5, i=2, f2=4, l=3\\) .*" "continue to call2h"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # monitor only allows 8 breakpoints; w89k board allows 10, so
@@ -236,9 +223,9 @@ proc float_and_integral_args {} {
 
     # Continue; should stop at call2i and print actual arguments.
     if [gdb_test "cont" ".* call2i \\(c1=97 'a', f1=4, c2=97 'a', c3=97 'a', d1=5, c4=97 'a', c5=97 'a', c6=97 'a', f2=4, s=1, c7=97 'a', d2=5\\) .*" "continue to call2i"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 
@@ -260,10 +247,8 @@ proc complex_args {} {
 
     # Run; should stop at call1a and print actual arguments.
     gdb_run_cmd
-    gdb_expect {
-       -re ".* callca \\(f1=1 \\+ 2 \\* I, f2=1 \\+ 2 \\* I, f3=1 \\+ 2 \\* I\\) .*$gdb_prompt $" { pass "run to call2a" }
-       timeout { fail "(timeout) run to callca" ; gdb_suppress_tests; }
-    }
+    gdb_test "" " callca \\(f1=1 \\+ 2 \\* I, f2=1 \\+ 2 \\* I, f3=1 \\+ 2 \\* I\\) .*" "run to call2a"
+
     gdb_test "cont" ".* callcb \\(d1=3 \\+ 4 \\* I, d2=3 \\+ 4 \\* I, d3=3 \\+ 4 \\* I\\) .*" "continue to callcb"
     gdb_test "cont" ".* callcc \\(ld1=5 \\+ 6 \\* I, ld2=5 \\+ 6 \\* I, ld3=5 \\+ 6 \\* I\\) .*" "continue to callcc"
     gdb_test "cont" ".* callcd \\(fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*" "continue to callcd"
@@ -285,10 +270,8 @@ proc complex_integral_args {} {
 
     # Run; should stop at call1a and print actual arguments.
     gdb_run_cmd
-    gdb_expect {
-       -re ".* callc1a \\(c=97 'a', s=1, i=2, ui=7, l=3, fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*$gdb_prompt $" { pass "run to callc1a" }
-       timeout { fail "(timeout) run to callc1a" ; gdb_suppress_tests; }
-    }
+    gdb_test "" " callc1a \\(c=97 'a', s=1, i=2, ui=7, l=3, fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*" "run to callc1a"
+
     gdb_test "cont" ".* callc1b \\(ldc1=5 \\+ 6 \\* I\\, c=97 'a', s=1, i=2, fc1=1 \\+ 2 \\* I, ui=7, l=3, dc1=3 \\+ 4 \\* I\\) .*" "continue to callc1b"
 }
 
@@ -305,10 +288,8 @@ proc complex_float_integral_args {} {
 
     # Run; should stop at call1a and print actual arguments.
     gdb_run_cmd
-    gdb_expect {
-       -re ".* callc2a \\(c=97 'a', s=1, i=2, ui=7, l=3, f=4, d=5, fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*$gdb_prompt $" { pass "run to callc2a" }
-       timeout { fail "(timeout) run to callc1a" ; gdb_suppress_tests; }
-    }
+    gdb_test "" " callc2a \\(c=97 'a', s=1, i=2, ui=7, l=3, f=4, d=5, fc1=1 \\+ 2 \\* I, dc1=3 \\+ 4 \\* I, ldc1=5 \\+ 6 \\* I\\) .*" "run to callc2a"
+
     gdb_test "cont" ".* callc2b \\(fc1=1 \\+ 2 \\* I, c=97 'a', s=1, i=2, ui=7, ldc1=5 \\+ 6 \\* I\\, l=3, f=4, d=5, dc1=3 \\+ 4 \\* I\\) .*" "continue to callc2b"
 }
 
@@ -331,11 +312,7 @@ proc pointer_args {} {
     # Try dereferencing the arguments.
 
     gdb_run_cmd
-    gdb_expect {
-        -re ".* call3a \\(cp=$hex <c> \"a.*\", sp=$hex <s>, ip=$hex <i>, lp=$hex <l>\\) .*$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; }
-    }
+    gdb_test "" " call3a \\(cp=$hex <c> \"a.*\", sp=$hex <s>, ip=$hex <i>, lp=$hex <l>\\) .*" "run to call3a"
 
     gdb_test "print *cp" ".* = 97 'a'"
     gdb_test "print *sp" ".* = 1"
@@ -345,7 +322,7 @@ proc pointer_args {} {
     # Continue; should stop at call3b and print actual arguments.
     # Try dereferencing the arguments.
     if [gdb_test "cont" ".* call3b \\(ucp=$hex <uc> \"b.*\", usp=$hex <us>, uip=$hex <ui>, ulp=$hex <ul>\\) .*" "continue to call3b"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     gdb_test "print *ucp" ".* = 98 'b'"
@@ -356,14 +333,14 @@ proc pointer_args {} {
     # Continue; should stop at call3c and print actual arguments.
     # Try dereferencing the arguments.
     if [gdb_test "cont" ".* call3c \\(fp=$hex <f>, dp=$hex <d>\\) .*" "continue to call3c"] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     gdb_test "print *fp" ".* = 4"
     gdb_test "print *dp" ".* = 5"
 
 #    pass "locate actual args, pointer types"
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 #
@@ -387,13 +364,7 @@ proc structs_by_reference {} {
     # Try dereferencing the arguments.
 
     gdb_run_cmd
-    gdb_expect {
-        -re ".* call4a \\(stp=$hex <st>\\) .*$gdb_prompt $" {
-           pass "run to call4a"
-       }
-        -re "$gdb_prompt $" { fail "run to call4a" ; gdb_suppress_tests; }
-        timeout { fail "(timeout) run to call4a" ; gdb_suppress_tests; }
-    }
+    gdb_test "" " call4a \\(stp=$hex <st>\\) .*" "run to call4a"
 
     gdb_test "print *stp" ".* = \{s1 = 101, s2 = 102\}"
 
@@ -419,7 +390,7 @@ proc structs_by_reference {} {
     }
 
     pass "locate actual args, structs/unions passed by reference"
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 #
@@ -443,13 +414,7 @@ proc structs_by_value {} {
     # Try dereferencing the arguments.
 
     gdb_run_cmd
-    gdb_expect {
-        -re ".* call5a \\(st=\{s1 = 101, s2 = 102\}\\) .*$gdb_prompt $" {
-           pass "run to call5a"
-       }
-        -re "$gdb_prompt $" { fail "run to call5a" ; gdb_suppress_tests; }
-        timeout { fail "(timeout) run to call5a" ; gdb_suppress_tests; }
-    }
+    gdb_test "" " call5a \\(st=\{s1 = 101, s2 = 102\}\\) .*" "run to call5a"
 
     gdb_test "print st" ".* = \{s1 = 101, s2 = 102\}"
 
@@ -487,7 +452,7 @@ proc structs_by_value {} {
        fail "print un (unknown case)"
     }
 
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 #
@@ -516,18 +481,10 @@ proc discard_and_shuffle {} {
     # Print backtrace.
 
     gdb_run_cmd
-    gdb_expect {
-        -re ".*Breakpoint $decimal, call6a .*$gdb_prompt $" { pass "run to call6a" }
-        -re "$gdb_prompt $" { fail "run to call6a" ; gdb_suppress_tests; }
-        timeout { fail "(timeout) run to call6a" ; gdb_suppress_tests; }
-    }
+    gdb_test "" "Breakpoint $decimal, call6a .*" "run to call6a"
 
     setup_xfail "rs6000-*-*"
 
-    if {!$gcc_compiled} {
-       setup_xfail "mips-sgi-irix5*"
-    }
-
     gdb_test_multiple "backtrace 100" "backtrace from call6a" {
        -re " call6a \\(c=97 'a', s=1, i=2, l=3, f=4, d=5, uc=98 'b', us=6, ui=7, ul=8\\) .* main \\(.*\\) .*$gdb_prompt $" {
            pass "backtrace from call6a"
@@ -547,7 +504,7 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call6c and print actual arguments.
@@ -561,7 +518,7 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
     # Continue; should stop at call6d and print actual arguments.
     # Print backtrace.
@@ -575,7 +532,7 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call6e and print actual arguments.
@@ -591,7 +548,7 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call6f and print actual arguments.
@@ -608,7 +565,7 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call6g and print actual arguments.
@@ -626,7 +583,7 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call6h and print actual arguments.
@@ -645,7 +602,7 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # monitor only allows 8 breakpoints; w89k board allows 10, so
@@ -672,7 +629,7 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call6j and print actual arguments.
@@ -693,7 +650,7 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
 
     # Continue; should stop at call6k and print actual arguments.
@@ -714,9 +671,9 @@ proc discard_and_shuffle {} {
        "\[\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 \\(.*\\) at "
     } ] {
-       gdb_suppress_tests;
+       gdb_suppress_tests
     }
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 
@@ -746,15 +703,9 @@ proc shuffle_round_robin {} {
     # Print backtrace.
 
     gdb_run_cmd
-    gdb_expect {
-        -re ".*Breakpoint $decimal, call7a .*$gdb_prompt $" {
-           pass "run to call7a"
-       }
-        -re "$gdb_prompt $" { fail "run to call7a" ; gdb_suppress_tests; }
-        timeout { fail "(timeout) run to call7a" ; gdb_suppress_tests; }
-    }
+    gdb_test "" "Breakpoint $decimal, call7a .*" "run to call7a"
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" "mips-sgi-irix5*" }
+    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
     gdb_test_multiple "backtrace 100" "backtrace from call7a" {
        -re " call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .* main \\(.*\\) .*$gdb_prompt $" {
            pass "backtrace from call7a"
@@ -907,7 +858,6 @@ proc shuffle_round_robin {} {
 
     gdb_continue call7k
 
-    if {!$gcc_compiled} then { setup_xfail "mips-sgi-irix*" }
     gdb_test_sequence "backtrace 100" "backtrace from call7k" {
        "\[\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\\) "
@@ -922,7 +872,7 @@ proc shuffle_round_robin {} {
        "\[\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 \\(.*\\) at "
     }
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 #
@@ -942,11 +892,7 @@ proc recursive_structs_by_value {} {
     # Run; should stop at hitbottom and print actual arguments.
     # Print backtrace.
     gdb_run_cmd
-    gdb_expect {
-        -re ".*Breakpoint $decimal, hitbottom .*$gdb_prompt $" { pass "run to hitbottom" }
-        -re "$gdb_prompt $" { fail "run to hitbottom" ; gdb_suppress_tests; }
-        timeout { fail "(timeout) run to hitbottom" ; gdb_suppress_tests; }
-    }
+    gdb_test "" "Breakpoint $decimal, hitbottom .*" "run to hitbottom"
 
     if ![istarget sparclet-*-*] {
        gdb_test_sequence "backtrace 100" "recursive passing of structs by value" {
@@ -962,7 +908,7 @@ proc recursive_structs_by_value {} {
     } else {
        fail "recursive passing of structs by value (sparclet)"
     }
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 #
@@ -998,7 +944,7 @@ proc localvars_after_alloca { } {
     gdb_test "print l" " = 3" "print l in localvars_after_alloca"
 
     gdb_test "backtrace 8" "#0.*localvars_after_alloca \\(c=97 'a', s=1, i=2, l=3\\).*#1.*main.*" "backtrace after alloca"
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 proc call_after_alloca { } {
@@ -1021,7 +967,7 @@ proc call_after_alloca { } {
 
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
     gdb_test "backtrace 8" "#0.*call_after_alloca_subr \\(c=97 'a', s=1, i=2, l=3, uc=98 'b', us=11, ui=12, ul=13\\).*#1.*call_after_alloca \\(c=97 'a', s=1, i=2, l=3\\).*#2.*main.*" "backtrace from call_after_alloca_subr"
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 #
@@ -1083,18 +1029,18 @@ proc localvars_in_indirect_call { } {
        }
        -re ".*$gdb_prompt $" {
            fail "finish from indirectly called function"
-           gdb_suppress_tests;
+           gdb_suppress_tests
        }
        default { 
            fail "finish from indirectly called function"
-           gdb_suppress_tests
+           gdb_suppress_tests
        }
     }
 
     if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
     gdb_test "step" "call0a \\(c=97 'a', s=1, i=2, l=3\\).*" \
        "stepping into indirectly called function"
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
 #
@@ -1157,16 +1103,9 @@ proc test_stepping_over_trampolines { } {
            gdb_suppress_tests
        }
     }
-    gdb_stop_suppressing_tests;
+    gdb_stop_suppressing_tests
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 set prev_timeout $timeout
 if [istarget "mips*tx39-*"] {
     set timeout 300