Copyright updates for 2007.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / call-ar-st.exp
index 8d14f6cf11f7a24603ebb39ae5381e709bb31838..7b909186ac3b4990aade32693442da4d5b1aa35a 100644 (file)
@@ -1,4 +1,4 @@
-#   Copyright (C) 1998
+#   Copyright 1998, 1999, 2000, 2001, 2004, 2007
 #   Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -32,9 +32,14 @@ set testfile "call-ar-st"
 set srcfile ${testfile}.c
 set binfile ${objdir}/${subdir}/${testfile}
 
+# Test depends on printf, which the sparclet stub doesn't support.  
+if { [istarget "sparclet-*-*"] } {
+    return 0;
+}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
+    untested "couldn't compile ${srcdir}/${subdir}/${srcfile}"
+    return -1
 }
 
 
@@ -45,13 +50,17 @@ if [get_compiler_info ${binfile}] {
     return -1;
 }
 
-# The a29k can't call functions, so don't even bother with this test.
+# Some targets can't call functions, so don't even bother with this
+# test.
 if [target_info exists gdb,cannot_call_functions] {
     setup_xfail "*-*-*" 2416
     fail "This target can not call functions"
     continue
 }
 
+set oldtimeout $timeout
+set timeout [expr "$timeout + 60"]
+
 # Set the current language to C.  This counts as a test.  If it
 # fails, then we skip the other tests.
 
@@ -81,10 +90,6 @@ proc set_lang_c {} {
     }
 }
 
-
-source ${binfile}.ci
-
-
 # Start with a fresh gdb.
 
 gdb_exit
@@ -101,6 +106,8 @@ if ![runto_main] then {
     continue
 }
 
+get_debug_format
+
 #go -until 1209
 gdb_test "tbreak 1209" \
     "Breakpoint \[0-9\]+.*file.*$srcfile, line 1209.*" \
@@ -112,38 +119,32 @@ gdb_test continue \
 
 
 #call print_double_array(double_array)
-if {![target_info exists gdb,skip_float_tests]} {
+if {![gdb_skip_float_test "print print_double_array(double_array)"] && \
+    ![gdb_skip_stdio_test "print print_double_array(double_array)"] } {
   send_gdb "print print_double_array(double_array)\n"
   gdb_expect_list "print print_double_array(double_array)" ".*$gdb_prompt $" {
        "\[ \t\r\n\]+array_d :"
        "\[ \t\r\n\]+========="
        "\[ \t\r\n\]+0.000000"
-       "\[ \t\r\n\]+23.456700  46.913400  70.370100  93.826800  117.283500  140.740200  164.196900  187.653600"
-       "\[ \t\r\n\]+211.110300  234.567000  258.023700  281.480400  304.937100  328.393800  351.850500  375.307200"
-       "\[ \t\r\n\]+398.763900  422.220600  445.677300  469.134000  492.590700  516.047400  539.504100  562.960800"
-       "\[ \t\r\n\]+586.417500  609.874200  633.330900  656.787600  680.244300  703.701000  727.157700  750.614400"
-       "\[ \t\r\n\]+774.071100  797.527800  820.984500  844.441200  867.897900  891.354600  914.811300  938.268000"
-       "\[ \t\r\n\]+961.724700  985.181400  1008.638100  1032.094800  1055.551500  1079.008200  1102.464900  1125.921600"
-       "\[ \t\r\n\]+1149.378300  1172.835000  1196.291700  1219.748400  1243.205100  1266.661800  1290.118500  1313.575200"
-       "\[ \t\r\n\]+1337.031900  1360.488600  1383.945300  1407.402000  1430.858700  1454.315400  1477.772100  1501.228800"
-       "\[ \t\r\n\]+1524.685500  1548.142200  1571.598900  1595.055600  1618.512300  1641.969000  1665.425700  1688.882400"
-       "\[ \t\r\n\]+1712.339100  1735.795800  1759.252500  1782.709200  1806.165900  1829.622600  1853.079300  1876.536000"
-       "\[ \t\r\n\]+1899.992700  1923.449400  1946.906100  1970.362800  1993.819500  2017.276200  2040.732900  2064.189600"
-       "\[ \t\r\n\]+2087.646300  2111.103000  2134.559700  2158.016400  2181.473100  2204.929800  2228.386500  2251.843200"
-       "\[ \t\r\n\]+2275.299900  2298.756600  2322.213300\[ \t\r\n\]+\[ \t\r\n\]+"
+       "\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]"
+       "\[ \t\r\n\]+"
   }
 }
 
 #call print_char_array(char_array)
 
-send_gdb "print print_char_array(char_array)\n"
-gdb_expect {
-    -re "array_c :\[ \t\r\n\]+=========\[ \t\r\n\]+\[ \t\r\n\]+Z\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZa\[ \t\r\n\]+\[ \t\r\n\]+.*\[ \t\r\n\]+.*$gdb_prompt $" {
-        pass "print print_char_array(char_array)"
-      }
-    -re ".*$gdb_prompt $" { fail "print print_char_array(char_array)" }
-    timeout           { fail "(timeout) print print_char_array(char_array)" }
-  }
+if ![gdb_skip_stdio_test "print_char_array(char_array)"] {
+    send_gdb "print print_char_array(char_array)\n"
+    gdb_expect_list "print print_char_array(char_array)" ".*$gdb_prompt $" {
+       "\[ \t\r\n\]+array_c :"
+       "\[ \t\r\n\]+========="
+       "\[ \t\r\n\]+\[ \t\r\n\]+Z"
+       "\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ"
+       "\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ"
+       "\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZa\[ \t\r\n\]+\[ \t\r\n\]+"
+    }
+}
+
 
 
 
@@ -152,13 +153,20 @@ gdb_test "tbreak 1216" \
 "Breakpoint.*file.*$srcfile, line 1216.*" \
 "tbreakpoint line 1216"
 
-send_gdb "continue\n"
-gdb_expect {
-    -re "array_c :\[ \t\r\n\]+=========\[ \t\r\n\]+\[ \t\r\n\]+Z\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZa\[ \t\r\n\]+\[ \t\r\n\]+\[ \t\r\n\]+main.*at.*$srcfile:1216\[ \t\r\n\]+.*print_double_array\\(double_array\\).*$gdb_prompt $" {
-        pass "continue to 1216"
-      }
-    -re ".*$gdb_prompt $" { fail "continue to 1216" }
-    timeout           { fail "(timeout) continue to 1216" }
+if ![gdb_skip_stdio_test "continue to 1216"] {
+    send_gdb "continue\n"
+    gdb_expect_list "continue to 1216" ".*$gdb_prompt $" {
+       "\[ \t\r\n\]+array_c :"
+       "\[ \t\r\n\]+========="
+       "\[ \t\r\n\]+\[ \t\r\n\]+Z"
+       "\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ"
+       "\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZ"
+       "\[ \t\r\n\]+aZaZaZaZaZaZaZaZaZa"
+       "\[ \t\r\n\]+main.*at.*:1216"
+       "\[ \t\r\n\]+1216.*print_double_array\\(double_array\\)"
+    }
+} else {
+    gdb_test "continue" "" ""
 }
 
 # I am disabling this test, because it takes too long. I verified by
@@ -176,74 +184,66 @@ gdb_expect {
 #set timeout $oldtimeout
 #go -until 1220
 gdb_test "tbreak 1220" \
-    "Breakpoint.* file .*$srcfile, line 1220.*" \
-    "tbreakpoint line 1220"
-
-send_gdb "continue\n"
-gdb_expect_list "continuing to breakpoint 1220" ".*$gdb_prompt $" {
-    "Continuing\\."
-    "\[ \t\r\n\]+array_d :"
-    "\[ \t\r\n\]+========="
-    "\[ \t\r\n\]+0.000000"
-    "\[ \t\r\n\]+23.456700  46.913400  70.370100  93.826800  117.283500  140.740200  164.196900  187.653600"
-    "\[ \t\r\n\]+211.110300  234.567000  258.023700  281.480400  304.937100  328.393800  351.850500  375.307200"
-    "\[ \t\r\n\]+398.763900  422.220600  445.677300  469.134000  492.590700  516.047400  539.504100  562.960800"
-    "\[ \t\r\n\]+586.417500  609.874200  633.330900  656.787600  680.244300  703.701000  727.157700  750.614400"
-    "\[ \t\r\n\]+774.071100  797.527800  820.984500  844.441200  867.897900  891.354600  914.811300  938.268000"
-    "\[ \t\r\n\]+961.724700  985.181400  1008.638100  1032.094800  1055.551500  1079.008200  1102.464900  1125.921600"
-    "\[ \t\r\n\]+1149.378300  1172.835000  1196.291700  1219.748400  1243.205100  1266.661800  1290.118500  1313.575200"
-    "\[ \t\r\n\]+1337.031900  1360.488600  1383.945300  1407.402000  1430.858700  1454.315400  1477.772100  1501.228800"
-    "\[ \t\r\n\]+1524.685500  1548.142200  1571.598900  1595.055600  1618.512300  1641.969000  1665.425700  1688.882400"
-    "\[ \t\r\n\]+1712.339100  1735.795800  1759.252500  1782.709200  1806.165900  1829.622600  1853.079300  1876.536000"
-    "\[ \t\r\n\]+1899.992700  1923.449400  1946.906100  1970.362800  1993.819500  2017.276200  2040.732900  2064.189600"
-    "\[ \t\r\n\]+2087.646300  2111.103000  2134.559700  2158.016400  2181.473100  2204.929800  2228.386500  2251.843200"
-    "\[ \t\r\n\]+2275.299900  2298.756600  2322.213300\[ \t\r\n\]+\[ \t\r\n\]+"
-    ".*array_f :"
-    ".*student id :\[\t \]+.*YELLOW"
-    ".*array_i :"
-    ".*main \\(\\) at .*call-ar-st.c:1220\[ \t\r\n\]+.*print_all_arrays\\(integer_array, char_array, float_array, double_array\\)."
+       "Breakpoint.* file .*$srcfile, line 1220.*" \
+       "tbreakpoint line 1220"
+
+if {![gdb_skip_float_test "continuing to breakpoint 1220"] && \
+    ![gdb_skip_stdio_test "continuing to breakpoint 1220"] } {
+    send_gdb "continue\n"
+    gdb_expect_list "continuing to breakpoint 1220" ".*$gdb_prompt $" {
+       "Continuing\\."
+       "\[ \t\r\n\]+array_d :"
+       "\[ \t\r\n\]+========="
+       "\[ \t\r\n\]+0.000000"
+       "\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*"
+       "\[ \t\r\n\]+"
+       ".*array_f :"
+       ".*student id :\[\t \]+.*YELLOW"
+       ".*array_i :"
+       ".*main \\(\\) at .*call-ar-st.c:1220\[ \t\r\n\]+.*print_all_arrays\\(integer_array, char_array, float_array, double_array\\)."
+    }
+} else {
+    gdb_test "continue" "" ""
 }
 
 #step
-    send_gdb "step\n"
-    gdb_expect {
-        -re "print_all_arrays \\(array_i=, array_c=.ZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZa., array_f=, array_d=\\) at .*call-ar-st.c:306\[ \t\r\n\]+306.*print_int_array\\(array_i\\);.*$gdb_prompt $" {pass "step inside print_all_arrays"}
-        -re ".*$gdb_prompt $" { fail "step inside print_all_arrays" }
-        timeout { fail "step inside print_all_arrays (timeout)" }
-    }
+send_gdb "step\n"
+gdb_expect {
+    -re "print_all_arrays \\(array_i=, array_c=.ZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZa., array_f=, array_d=\\) at .*call-ar-st.c:306\[ \t\r\n\]+306.*print_int_array\\(array_i\\);.*$gdb_prompt $" {pass "step inside print_all_arrays"}
+    -re ".*$gdb_prompt $" { fail "step inside print_all_arrays" }
+    timeout { fail "step inside print_all_arrays (timeout)" }
+}
 
 
 #step -over
+if ![gdb_skip_stdio_test "next over print_int_array in print_all_arrays"] {
     send_gdb "next\n"
     gdb_expect {
-        -re "array_i :.*307.*print_char_array\\(array_c\\);.*$gdb_prompt $" {pass "next over print_int_array in print-all_arrays"}
-        -re ".*$gdb_prompt $" { fail "next over print_int_array in print-all_arrays" }
-        timeout { fail "next over print_int_array in print-all_arrays (timeout)" }
+       -re "array_i :.*307.*print_char_array.*$gdb_prompt $" {
+           pass "next over print_int_array in print-all_arrays"
+       }
+       -re ".*$gdb_prompt $" { 
+           fail "next over print_int_array in print-all_arrays" 
+       }
+       timeout { 
+           fail "next over print_int_array in print-all_arrays (timeout)"
+       }
     }
-
-
+} else {
+    gdb_test "next" "" ""
+}
 
 #call print_double_array(array_d)
-if {![target_info exists gdb,skip_float_tests]} {
-  send_gdb "print print_double_array(array_d)\n"
-  gdb_expect_list "print print_double_array(array_d)" ".*$gdb_prompt $" {
-      "array_d :"
-      "\[ \t\r\n\]+========="
-      "\[ \t\r\n\]+\[ \t\r\n\]+0.000000"
-      "\[ \t\r\n\]+23.456700  46.913400  70.370100  93.826800  117.283500  140.740200  164.196900  187.653600"
-      "\[ \t\r\n\]+211.110300  234.567000  258.023700  281.480400  304.937100  328.393800  351.850500  375.307200"
-      "\[ \t\r\n\]+398.763900  422.220600  445.677300  469.134000  492.590700  516.047400  539.504100  562.960800"
-      "\[ \t\r\n\]+586.417500  609.874200  633.330900  656.787600  680.244300  703.701000  727.157700  750.614400"
-      "\[ \t\r\n\]+774.071100  797.527800  820.984500  844.441200  867.897900  891.354600  914.811300  938.268000"
-      "\[ \t\r\n\]+961.724700  985.181400  1008.638100  1032.094800  1055.551500  1079.008200  1102.464900  1125.921600"
-      "\[ \t\r\n\]+1149.378300  1172.835000  1196.291700  1219.748400  1243.205100  1266.661800  1290.118500  1313.575200"
-      "\[ \t\r\n\]+1337.031900  1360.488600  1383.945300  1407.402000  1430.858700  1454.315400  1477.772100  1501.228800"
-      "\[ \t\r\n\]+1524.685500  1548.142200  1571.598900  1595.055600  1618.512300  1641.969000  1665.425700  1688.882400"
-      "\[ \t\r\n\]+1712.339100  1735.795800  1759.252500  1782.709200  1806.165900  1829.622600  1853.079300  1876.536000"
-      "\[ \t\r\n\]+1899.992700  1923.449400  1946.906100  1970.362800  1993.819500  2017.276200  2040.732900  2064.189600"
-      "\[ \t\r\n\]+2087.646300  2111.103000  2134.559700  2158.016400  2181.473100  2204.929800  2228.386500  2251.843200"
-      "\[ \t\r\n\]+2275.299900  2298.756600  2322.213300\[ \t\r\n\]+\[ \t\r\n\]+"
-  }
+if {![gdb_skip_float_test "print print_double_array(array_d)"] && \
+    ![gdb_skip_stdio_test "print print_double_array(array_d)"] } {
+    send_gdb "print print_double_array(array_d)\n"
+    gdb_expect_list "print print_double_array(array_d)" ".*$gdb_prompt $" {
+       "array_d :"
+       "\[ \t\r\n\]+========="
+       "\[ \t\r\n\]+\[ \t\r\n\]+0.000000"
+       "\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*"
+       "\[ \t\r\n\]+"
+    }
 }
 
 #go -until 1236
@@ -251,58 +251,64 @@ gdb_test "tbreak 1236" \
 "Breakpoint.* file .*$srcfile, line 1236.*" \
 "tbreakpoint line 1236"
 
-send_gdb "continue\n"
-gdb_expect_list "continuing to 1236"  ".*$gdb_prompt $" {
-    "Continuing\\..*array_c"
-    ".*array_f"
-    "\[ \t\r\n\]+array_d :"
-    "\[ \t\r\n\]+========="
-    "\[ \t\r\n\]+0.000000"
-    "\[ \t\r\n\]+23.456700  46.913400  70.370100  93.826800  117.283500  140.740200  164.196900  187.653600"
-    "\[ \t\r\n\]+211.110300  234.567000  258.023700  281.480400  304.937100  328.393800  351.850500  375.307200"
-    "\[ \t\r\n\]+398.763900  422.220600  445.677300  469.134000  492.590700  516.047400  539.504100  562.960800"
-    "\[ \t\r\n\]+586.417500  609.874200  633.330900  656.787600  680.244300  703.701000  727.157700  750.614400"
-    "\[ \t\r\n\]+774.071100  797.527800  820.984500  844.441200  867.897900  891.354600  914.811300  938.268000"
-    "\[ \t\r\n\]+961.724700  985.181400  1008.638100  1032.094800  1055.551500  1079.008200  1102.464900  1125.921600"
-    "\[ \t\r\n\]+1149.378300  1172.835000  1196.291700  1219.748400  1243.205100  1266.661800  1290.118500  1313.575200"
-    "\[ \t\r\n\]+1337.031900  1360.488600  1383.945300  1407.402000  1430.858700  1454.315400  1477.772100  1501.228800"
-    "\[ \t\r\n\]+1524.685500  1548.142200  1571.598900  1595.055600  1618.512300  1641.969000  1665.425700  1688.882400"
-    "\[ \t\r\n\]+1712.339100  1735.795800  1759.252500  1782.709200  1806.165900  1829.622600  1853.079300  1876.536000"
-    "\[ \t\r\n\]+1899.992700  1923.449400  1946.906100  1970.362800  1993.819500  2017.276200  2040.732900  2064.189600"
-    "\[ \t\r\n\]+2087.646300  2111.103000  2134.559700  2158.016400  2181.473100  2204.929800  2228.386500  2251.843200"
-    "\[ \t\r\n\]+2275.299900  2298.756600  2322.213300.*HELLO WORLD.*main \\(\\) at .*call-ar-st.c:1236.*printf\\(.BYE BYE FOR NOW.n.\\)."
+if {![gdb_skip_float_test "continuing to 1236"] && \
+    ![gdb_skip_stdio_test "continuing to 1236"] } {
+    send_gdb "continue\n"
+    gdb_expect_list "continuing to 1236"  ".*$gdb_prompt $" {
+       "Continuing\\..*array_c"
+       ".*array_f"
+       "\[ \t\r\n\]+array_d :"
+       "\[ \t\r\n\]+========="
+       "\[ \t\r\n\]+0.000000"
+       "\[ \t\r\n\]+23.456\[0-9\]*  46.913\[0-9\]*  70.370\[0-9\]*  93.826\[0-9\]*  117.283\[0-9\]*  140.740\[0-9\]*  164.196\[0-9\]*  187.653\[0-9\]*"
+       "\[ \t\r\n\]+.*HELLO WORLD.*main \\(\\) at .*call-ar-st.c:1236.*printf\\(.BYE BYE FOR NOW.n.\\)."
+    }
+} else {
+    gdb_test "continue" "" ""
 }
 
 
 #call sum_array_print(10, *list1, *list2, *list3, *list4)
 
-send_gdb "print sum_array_print(10, *list1, *list2, *list3, *list4)\n"
-gdb_expect {
-    -re ".*Sum of 4 arrays, by element \\(add in seed as well\\):\[ \t\r\n\]+Seed: 10\[ \t\r\n\]+Element Index . Sum\[ \t\r\n\]+-------------------------\[ \t\r\n\]+.*\[ \t\]+0\[ \t\]+52\[ \t\r\n\]+1\[ \t\]+60\[ \t\r\n\]+2\[ \t\]+68\[ \t\r\n\]+3\[ \t\]+76\[ \t\r\n\]+4\[ \t\]+84\[ \t\r\n\]+5\[ \t\]+92\[ \t\r\n\]+6\[ \t\]+100\[ \t\r\n\]+7\[ \t\]+108\[ \t\r\n\]+8\[ \t\]+116\[ \t\r\n\]+9\[ \t\]+124\[ \t\r\n\]+.*$gdb_prompt $" {
-        pass "print sum_array_print(10, *list1, *list2, *list3, *list4)"
-      }
-    -re ".*$gdb_prompt $" { fail "print sum_array_print(10, *list1, *list2, *list3, *list4)" }
-    timeout           { fail "(timeout) print sum_array_print(10, *list1, *list2, *list3, *list4)" }
-  }
+if ![gdb_skip_stdio_test "print sum_array_print(...)"] {
+    send_gdb "print sum_array_print(10, *list1, *list2, *list3, *list4)\n"
+    gdb_expect {
+       -re ".*Sum of 4 arrays, by element \\(add in seed as well\\):\[ \t\r\n\]+Seed: 10\[ \t\r\n\]+Element Index . Sum\[ \t\r\n\]+-------------------------\[ \t\r\n\]+.*\[ \t\]+0\[ \t\]+52\[ \t\r\n\]+1\[ \t\]+60\[ \t\r\n\]+2\[ \t\]+68\[ \t\r\n\]+3\[ \t\]+76\[ \t\r\n\]+4\[ \t\]+84\[ \t\r\n\]+5\[ \t\]+92\[ \t\r\n\]+6\[ \t\]+100\[ \t\r\n\]+7\[ \t\]+108\[ \t\r\n\]+8\[ \t\]+116\[ \t\r\n\]+9\[ \t\]+124\[ \t\r\n\]+.*$gdb_prompt $" {
+           pass "print sum_array_print(10, *list1, *list2, *list3, *list4)"
+       }
+       -re ".*$gdb_prompt $" { fail "print sum_array_print(10, *list1, *list2, *list3, *list4)" }
+       timeout           { fail "(timeout) print sum_array_print(10, *list1, *list2, *list3, *list4)" }
+    }
+}
 
 #step over
-send_gdb "n\n"
-gdb_expect {
-    -re ".*BYE BYE FOR NOW.*1237.*printf\\(.VERY GREEN GRASS.n.\\);.*$gdb_prompt $" { pass "next to 1237"}
-    -re ".*$gdb_prompt $" { fail "next to 1237" }
-    timeout { fail "next to 1237(timeout)" }
+if ![gdb_skip_stdio_test "next to 1237"] {
+    send_gdb "next\n"
+    gdb_expect {
+       -re ".*BYE BYE FOR NOW.*1237.*printf\\(.VERY GREEN GRASS.n.\\);.*$gdb_prompt $" { pass "next to 1237"}
+       -re ".*$gdb_prompt $" { fail "next to 1237" }
+       timeout { fail "next to 1237(timeout)" }
+    }
+} else {
+    gdb_test "next" "" ""
 }
 
 #call print_array_rep(\*list1, \*list2, \*list3)
 
-send_gdb "print print_array_rep(\*list1, \*list2, \*list3)\n"
-gdb_expect {
-    -re ".*$gdb_prompt $" {
-        pass "print print_array_rep(*list1, *list2, *list3)"
-      }
-    -re ".*$gdb_prompt $" { fail "print print_array_rep(*list1, *list2, *list3)" }
-    timeout           { fail "(timeout) print print_array_rep(*list1, *list2, *list3)" }
-  }
+if ![gdb_skip_stdio_test "print print_array_rep(...)"] {
+    send_gdb "print print_array_rep(\*list1, \*list2, \*list3)\n"
+    gdb_expect {
+       -re ".*$gdb_prompt $" {
+           pass "print print_array_rep(*list1, *list2, *list3)"
+       }
+       -re ".*$gdb_prompt $" { 
+           fail "print print_array_rep(*list1, *list2, *list3)" 
+       }
+       timeout               {
+           fail "(timeout) print print_array_rep(*list1, *list2, *list3)" 
+       }
+    }
+}
 
 #go -until 1241
 gdb_test "tbreak 1241" \
@@ -353,25 +359,61 @@ gdb_test "tbreak 1281" \
     "Breakpoint.* file .*call-ar-st.c, line 1281.*" \
     "tbreakpoint line 1281"
 
-send_gdb "continue\n"
-gdb_expect {
- -re  "Continuing\\..*Sum of 4 arrays.*Contents of linked list1.*Contents of two_floats_t.*main \\(\\) at .*call-ar-st.c:1281.*c = 0.*$gdb_prompt $" {
-                 pass "continue to 1281"}
-      -re ".*$gdb_prompt $" { fail "continue to 1281"}           
-      timeout           { fail "(timeout) continue to 1281"}
+if ![gdb_skip_stdio_test "continuing to 1281"] {
+    send_gdb "continue\n"
+    gdb_expect {
+       -re  "Continuing\\..*Sum of 4 arrays.*Contents of linked list1.*Contents of two_floats_t.*main \\(\\) at .*call-ar-st.c:1281.*c = 0.*$gdb_prompt $" {
+           pass "continue to 1281"
+       }
+       -re ".*$gdb_prompt $" { fail "continue to 1281"}           
+       timeout           { fail "(timeout) continue to 1281"}
+    }
+} else {
+    gdb_test "continue" "" ""
 }
 
-#call print_small_structs(*struct1, *struct2, *struct3, *struct4,*flags, *flags_combo,
-#*three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)
-if {![target_info exists gdb,skip_float_tests]} {
-  send_gdb "print print_small_structs(*struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)\n"
-  gdb_expect {
-    -re ".*alpha\[\t\r\n \]+gamma\[\t\r\n \]+epsilon\[\t\r\n \]+alpha\[\t\r\n \]+gamma\[\t\r\n \]+epsilon\[\t\r\n \]+ch1: y\tch2: n\[\t\r\n \]+Contents of three_char_t:\[\t\r\n \]+a\tb\tc\[\t\r\n \]+Contents of five_char_t:\[\t\r\n \]+l\tm\tn\to\tp\[\t\r\n \]+Contents of int_char_combo_t:\[\t\r\n \]+123.*z\[\t\r\n \]+Sum of the 4 struct values and seed :\[\t\r\n \]+52\[\t\r\n \]+Contents of struct1:\[\t\r\n \]+6.*0\[\t\r\n \]+Contents of struct2:\[\t\r\n \]+10.*0\[\t\r\n \]+Contents of struct3:\[\t\r\n \]+12.*0\[\t\r\n \]+Contents of one_double_t:\[\t\r\n \]+10.500000\[\t\r\n \]+Contents of one_double_t:.*-3.375000\[\t\r\n \]+Contents of one_double_t:.*675.093750\[\t\r\n \]+Contents of two_floats_t:.*45.234001.*43.599998\[\t\r\n \]+Contents of two_floats_t:.*78.010002.*122.099998\[\t\r\n \]+Contents of two_floats_t:.*-1232.344971.*-199.210007\[\t\r\n \]+.*$gdb_prompt $" {
-      pass "print print_small_structs"
+#call print_small_structs(*struct1, *struct2, *struct3, *struct4, 
+#                         *flags, *flags_combo, *three_char, *five_char, 
+#                         *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)
+
+if {![gdb_skip_float_test "print print_small_structs(...)"] && \
+    ![gdb_skip_stdio_test "print print_small_structs(...)"] } {
+    send_gdb "print print_small_structs(*struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)\n"
+    gdb_expect_list "print print_small_structs" ".*$gdb_prompt $" {
+       "\[\t\r\n \]+alpha"
+       "\[\t\r\n \]+gamma"
+       "\[\t\r\n \]+epsilon"
+       "\[\t\r\n \]+alpha"
+       "\[\t\r\n \]+gamma"
+       "\[\t\r\n \]+epsilon"
+       "\[\t\r\n \]+ch1: y[ \t]*ch2: n"
+       "\[\t\r\n \]+Contents of three_char_t:"
+       "\[\t\r\n \]+a[ \t]*b[ \t]*c"
+       "\[\t\r\n \]+Contents of five_char_t:"
+       "\[\t\r\n \]+l[ \t]*m[ \t]*n[ \t]*o[ \t]*p"
+       "\[\t\r\n \]+Contents of int_char_combo_t:"
+       "\[\t\r\n \]+123[ \t]*z"
+       "\[\t\r\n \]+Sum of the 4 struct values and seed :"
+       "\[\t\r\n \]+52"
+       "\[\t\r\n \]+Contents of struct1:"
+       "\[\t\r\n \]+6[ \t]*0"
+       "\[\t\r\n \]+Contents of struct2:"
+       "\[\t\r\n \]+10[ \t]*0"
+       "\[\t\r\n \]+Contents of struct3:"
+       "\[\t\r\n \]+12[ \t]*0"
+       "\[\t\r\n \]+Contents of one_double_t:"
+       "\[\t\r\n \]+10.500000"
+       "\[\t\r\n \]+Contents of one_double_t:"
+       "\[\t\r\n \]+-3.375000"
+       "\[\t\r\n \]+Contents of one_double_t:"
+       "\[\t\r\n \]+675.093750"
+       "\[\t\r\n \]+Contents of two_floats_t:"
+       "\[\t\r\n \]+45.234001[ \t]*43.599998"
+       "\[\t\r\n \]+Contents of two_floats_t:"
+       "\[\t\r\n \]+78.010002[ \t]*122.099998"
+       "\[\t\r\n \]+Contents of two_floats_t:"
+       "\[\t\r\n \]+-1232.344971[ \t]*-199.210007"
     }
-    -re ".*$gdb_prompt $" { fail "print print_small_structs" }
-    timeout           { fail "(timeout) print_small_structs" }
-  }
 }
 
 #call compute_with_small_structs(20)
@@ -385,16 +427,19 @@ gdb_expect {
   }
 
 
-#call print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)
-if {![target_info exists gdb,skip_float_tests]} {
-  send_gdb "print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)\n"
-  gdb_expect {
-    -re ".*Two Doubles : 123.456000.*123.456000\[\t\r\n \]+Two Doubles : -0.120000.*-1.230000\[\t\r\n \]+Two Doubles : 343434.800000.*89.098000\[\t\r\n \]+Two Doubles : 3.140000.*-5678.123450\[\t\r\n \]+Two Doubles : -0.111111.*216.970650\[\t\r\n \]+.*$gdb_prompt $" {
-      pass "print print_ten_doubles"
+#call print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 
+#                       3.14, -5678.12345, -0.11111111, 216.97065)
+
+if {![gdb_skip_float_test "print print_ten_doubles(...)"] && \
+    ![gdb_skip_stdio_test "print print_ten_doubles(...)"]} {
+    send_gdb "print print_ten_doubles(123.456, 123.456, -0.12, -1.23, 343434.8, 89.098, 3.14, -5678.12345, -0.11111111, 216.97065)\n"
+    gdb_expect_list "print print_ten_doubles" ".*$gdb_prompt $" {
+       "\[\t\r\n \]+Two Doubles : 123.45\[0-9\]*.*123.45\[0-9\]*"
+       "\[\t\r\n \]+Two Doubles : -0.1200\[0-9\]*.*-1.2300\[0-9\]*"
+       "\[\t\r\n \]+Two Doubles : 343434.\[0-9\]*.*89.09\[0-9\]*"
+       "\[\t\r\n \]+Two Doubles : 3.1400\[0-9\]*.*-5678.123\[0-9\]*"
+       "\[\t\r\n \]+Two Doubles : -0.1111\[0-9\]*.*216.97\[0-9\]*"
     }
-    -re ".*$gdb_prompt $" { fail "print print_ten_doubles" }
-    timeout           { fail "(timeout) print_ten_doubles" }
-  }
 }
 
 #go -until 1286
@@ -433,7 +478,7 @@ if { [istarget "hppa*-*-hpux*"] } {
     # overflows or something, and expect can't deal with the full
     # line.  Perhaps a more elegant solution exists... -sts 1999-08-17
     send_gdb "continue\n"
-    if {![target_info exists gdb,skip_float_tests]} {
+    if {![gdb_skip_float_test "step into print_long_arg_list"]} {
        gdb_expect {
            -re ".*print_long_arg_list \\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}, five_char=\{ch1 = 108 \'l\', ch2 = 109 \'m\', ch3 = 110 \'n\', ch4 = 111 \'o\', ch5 = 112 \'p\'\}, int_char_combo=\{int1 = 123, ch1 = 122 \'z\'\}, d1=\{double1 = 10.5\}, d2=\{double1 = -3.375\}, d3=\{double1 = 675.09375\}, f1=\{float1 = 45.2340012, float2 = 43.5999985\}, f2=\{float1 = 78.0100021, float2 = 122.099998\}, f3=\{float1 = -1232.34497, float2 = -199.210007\}\\) at .*${srcfile}:992\[\r\n\]+992\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" { pass "step into print_long_arg_list" }
            -re ".*print_long_arg_list.*\\(a=22.25, b=33.375, c=0, d=-25, e=100, f=2345, struct1=\{value = 6, head = 0\}, struct2=\{value = 10, head = 0\}, struct3=\{value = 12, head = 0\}, struct4=\{value = 14, head = 0\}, flags=\{alpha = 1, beta = 0, gamma = 1, delta = 0, epsilon = 1, omega = 0\}, flags_combo=\{alpha = 1, beta = 0, ch1 = 121 \'y\', gamma = 1, delta = 0, ch2 = 110 \'n\', epsilon = 1, omega = 0\}, three_char=\{ch1 = 97 \'a\', ch2 = 98 \'b\', ch3 = 99 \'c\'\}.*\\) at .*${srcfile}:992\[\r\n\]+992\[ \t\]+printf\\(\"double :.*\", a\\);.*$gdb_prompt $" {pass "step into print_long_arg_list (short match)"}
@@ -452,20 +497,55 @@ if { [istarget "hppa*-*-hpux*"] } {
 
 set ws "\[\n\r\t \]+"
 
-#call print_small_structs(struct1, struct2, struct3, struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1, d2, d3, f1, f2, f3)
-if {![target_info exists gdb,skip_float_tests]} {
-    # On Solaris, some of the args are passed by ref, others by value,
-    # and GDB gets confused and says "Invalid cast" because it thinks
-    # it has to cast the structure into a pointer to structure.  A real
-    # GDB bug, probably for all Sparc configs, but obscure. -sts 1999-08-17.
-    setup_xfail "sparc*-*-solaris*"
+#call print_small_structs(struct1, struct2, struct3, struct4, flags, 
+#                         flags_combo, three_char, five_char, int_char_combo, 
+#                         d1, d2, d3, f1, f2, f3)
+
+if {![gdb_skip_float_test "print_small_structs from print_long_arg_list"] && \
+    ![gdb_skip_stdio_test "print_small_structs from print_long_arg_list"] } {
+
+    # On 32-bit SPARC, some of the args are passed by ref, others by
+    # value, and GDB gets confused and says "Invalid cast" because it
+    # thinks it has to cast the structure into a pointer to structure.
+    if { [test_debug_format "stabs"] } then {
+       setup_kfail "gdb/1539" "sparc-*-*"
+    }
+
     send_gdb "print print_small_structs(struct1, struct2, struct3, struct4, flags, flags_combo, three_char, five_char, int_char_combo, d1, d2, d3, f1, f2, f3)\n"
-    gdb_expect {
-       -re ".*alpha${ws}gamma${ws}epsilon${ws}alpha${ws}gamma${ws}epsilon${ws}ch1: y\tch2: n${ws}Contents of three_char_t:${ws}a\tb\tc${ws}Contents of five_char_t:${ws}l\tm\tn\to\tp${ws}Contents of int_char_combo_t:${ws}123.*z${ws}Sum of the 4 struct values and seed :${ws}52${ws}Contents of struct1:${ws}6.*0${ws}Contents of struct2:${ws}10.*0${ws}Contents of struct3:${ws}12.*0${ws}Contents of one_double_t:${ws}10.500000${ws}Contents of one_double_t:${ws}-3.375000${ws}Contents of one_double_t:${ws}675.093750${ws}Contents of two_floats_t:${ws}45.234001.*43.599998${ws}Contents of two_floats_t:${ws}78.010002.*122.099998${ws}Contents of two_floats_t:${ws}-1232.344971.*-199.210007${ws}.*$gdb_prompt $" {
-           pass "print print_small_structs from print_long_arg_list"
-       }
-       -re ".*$gdb_prompt $" { fail "print print_small_structs from print_long_arg_list" }
-       timeout { fail "(timeout) print_small_structs from print_long_arg_list" }
+    gdb_expect_list "print print_small_structs from print_long_arg_list" ".*$gdb_prompt $" {
+       "\[\t\r\n \]+alpha"
+       "\[\t\r\n \]+gamma"
+       "\[\t\r\n \]+epsilon"
+       "\[\t\r\n \]+alpha"
+       "\[\t\r\n \]+gamma"
+       "\[\t\r\n \]+epsilon"
+       "\[\t\r\n \]+ch1: y[ \t]*ch2: n"
+       "\[\t\r\n \]+Contents of three_char_t:"
+       "\[\t\r\n \]+a\[ \t\]*b\[ \t\]*c"
+       "\[\t\r\n \]+Contents of five_char_t:"
+       "\[\t\r\n \]+l\[ \t\]*m\[ \t\]*n\[ \t\]*o\[ \t\]*p"
+       "\[\t\r\n \]+Contents of int_char_combo_t:"
+       "\[\t\r\n \]+123\[ \t\]*z"
+       "\[\t\r\n \]+Sum of the 4 struct values and seed :"
+       "\[\t\r\n \]+52"
+       "\[\t\r\n \]+Contents of struct1:"
+       "\[\t\r\n \]+6\[ \t\]*0"
+       "\[\t\r\n \]+Contents of struct2:"
+       "\[\t\r\n \]+10\[ \t\]*0"
+       "\[\t\r\n \]+Contents of struct3:"
+       "\[\t\r\n \]+12\[ \t\]*0"
+       "\[\t\r\n \]+Contents of one_double_t:"
+       "\[\t\r\n \]+10.500000"
+       "\[\t\r\n \]+Contents of one_double_t:"
+       "\[\t\r\n \]+-3.375000"
+       "\[\t\r\n \]+Contents of one_double_t:"
+       "\[\t\r\n \]+675.093750"
+       "\[\t\r\n \]+Contents of two_floats_t:"
+       "\[\t\r\n \]+45.234001\[ \t\]*43.599998"
+       "\[\t\r\n \]+Contents of two_floats_t:"
+       "\[\t\r\n \]+78.010002\[ \t\]*122.099998"
+       "\[\t\r\n \]+Contents of two_floats_t:"
+       "\[\t\r\n \]+-1232.344971\[ \t\]*-199.210007"
     }
 }
 
@@ -475,8 +555,12 @@ gdb_test "tbreak 1300" \
     "Breakpoint.* file .*call-ar-st.c, line 1300.*" \
     "tbreakpoint line 1300"
 
-gdb_test continue "Continuing\\..*Contents of two_floats_t:.*main \\(\\) at.*call-ar-st.c:1300.*1300.*init_bit_flags_combo\\(flags_combo, \\(unsigned\\)1, \\(unsigned\\)0, .y.,.*" \
-  "continue to 1300"
+if ![gdb_skip_stdio_test "continuing to 1300"] {
+    gdb_test "continue" "Continuing\\..*Contents of two_floats_t:.*main \\(\\) at.*call-ar-st.c:1300.*1300.*init_bit_flags_combo\\(flags_combo, \\(unsigned\\)1, \\(unsigned\\)0, .y.,.*" \
+           "continue to 1300"
+} else {
+    gdb_test "continue" "" ""
+}
 
 #step
     send_gdb "step\n"
@@ -489,14 +573,20 @@ init_bit_flags_combo \\(bit_flags_combo=, a=1, b=0, ch1=121 .y., g=1, d=0, ch2=1
     }
 
 #call print_bit_flags_combo(*bit_flags_combo)
-send_gdb "print print_bit_flags_combo(*bit_flags_combo)\n"
-gdb_expect {
-    -re ".*alpha.*gamma.*epsilon.*ch1: y\tch2: n.*$gdb_prompt $" {
-        pass "print print_bit_flags_combo from init_bit_flags_combo"
-      }
-    -re ".*$gdb_prompt $" { fail "print print_bit_flags_combo from init_bit_flags_combo" }
-    timeout           { fail "(timeout) print_bit_flags_combo from init_bit_flags_combo" }
-  }
+if ![gdb_skip_stdio_test "continuing to 1300"] {
+    send_gdb "print print_bit_flags_combo(*bit_flags_combo)\n"
+    gdb_expect {
+       -re ".*alpha.*gamma.*epsilon.*ch1: y.*ch2: n.*$gdb_prompt $" {
+           pass "print print_bit_flags_combo from init_bit_flags_combo"
+       }
+       -re ".*$gdb_prompt $" {
+           fail "print print_bit_flags_combo from init_bit_flags_combo" 
+       }
+       timeout           {
+           fail "(timeout) print_bit_flags_combo from init_bit_flags_combo" 
+       }
+    }
+}
 
 
 #go -until 1305
@@ -515,15 +605,47 @@ gdb_test continue "Continuing\\..*main \\(\\) at .*call-ar-st.c:1305\[\r\n\t \]+
 
 if {$hp_aCC_compiler} {setup_xfail "hppa*-*-*" CLLbs16994}
 
-if {![target_info exists gdb,skip_float_tests]} {
-  send_gdb "print print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)\n"
-  gdb_expect {
-    -re ".*double : 22.250000.*double : 33.375000.*int : 0.*int : -25.*int : 100.*int : 2345.*alpha.*gamma.*epsilon.*ch1: y\tch2: n.*Contents of three_char_t:.*x\ty\tz.*Contents of five_char_t:.*h\te\tl\tl\to.*Contents of int_char_combo_t:.*123\tz.*Sum of the 4 struct values and seed :.*52.*Contents of struct1:.*6\[ \]+0.*Contents of struct2:.*10\[ \]+0.*Contents of struct3:.*12.*0.*Contents of one_double_t:\[ \n\r\t\]+1.111110\[ \n\r\t\]+Contents of one_double_t:\[ \n\r\t\]+-345.340000\[ \n\r\t\]+Contents of one_double_t:\[ \n\r\t\]+546464.200000\[ \n\r\t\]+Contents of two_floats_t:\[ \n\r\t\]+0.234000\t453.100006\[ \n\r\t\]+Contents of two_floats_t:\[ \n\r\t\]+78.345001\t23.090000\[ \n\r\t\]+Contents of two_floats_t:\[ \n\r\t\]+-2.345000\t1.000000.*$gdb_prompt $" {
-      pass "print print_long_arg_list"
+if {![gdb_skip_float_test "print print_long_arg_list"] && \
+    ![gdb_skip_stdio_test "print print_long_arg_list"] } {
+    send_gdb "print print_long_arg_list(a, b, c, d, e, f, *struct1, *struct2, *struct3, *struct4, *flags, *flags_combo, *three_char, *five_char, *int_char_combo, *d1, *d2, *d3, *f1, *f2, *f3)\n"
+    gdb_expect_list "print print_long_arg_list" ".*$gdb_prompt $" {
+       "\[ \n\r\t\]+double : 22.250000"
+       "\[ \n\r\t\]+double : 33.375000"
+       "\[ \n\r\t\]+int : 0"
+       "\[ \n\r\t\]+int : -25"
+       "\[ \n\r\t\]+int : 100"
+       "\[ \n\r\t\]+int : 2345"
+       "\[ \n\r\t\]+alpha"
+       "\[ \n\r\t\]+gamma"
+       "\[ \n\r\t\]+epsilon"
+       "\[ \n\r\t\]+ch1: y\[ \t\]+ch2: n"
+       "\[ \n\r\t\]+Contents of three_char_t:"
+       "\[ \n\r\t\]+x\[ \t\]+y\[ \t\]+z"
+       "\[ \n\r\t\]+Contents of five_char_t:"
+       "\[ \n\r\t\]+h\[ \t\]+e\[ \t\]+l\[ \t\]+l\[ \t\]+o"
+       "\[ \n\r\t\]+Contents of int_char_combo_t:"
+       "\[ \n\r\t\]+123\[ \t\]+z"
+       "\[ \n\r\t\]+Sum of the 4 struct values and seed :"
+       "\[ \n\r\t\]+52"
+       "\[ \n\r\t\]+Contents of struct1:"
+       "\[ \n\r\t\]+6\[ \t\]+0"
+       "\[ \n\r\t\]+Contents of struct2:"
+       "\[ \n\r\t\]+10\[ \t\]+0"
+       "\[ \n\r\t\]+Contents of struct3:"
+       "\[ \n\r\t\]+12\[ \t\]+0"
+       "\[ \n\r\t\]+Contents of one_double_t:"
+       "\[ \n\r\t\]+1.111110"
+       "\[ \n\r\t\]+Contents of one_double_t:"
+       "\[ \n\r\t\]+-345.340000"
+       "\[ \n\r\t\]+Contents of one_double_t:"
+       "\[ \n\r\t\]+546464.200000"
+       "\[ \n\r\t\]+Contents of two_floats_t:"
+       "\[ \n\r\t\]+0.234000\[ \t\]+453.100006"
+       "\[ \n\r\t\]+Contents of two_floats_t:"
+       "\[ \n\r\t\]+78.345001\[ \t\]+23.090000"
+       "\[ \n\r\t\]+Contents of two_floats_t:"
+       "\[ \n\r\t\]+-2.345000\[ \t\]+1.000000"
     }
-    -re ".*$gdb_prompt $" { fail "print print_long_arg_list" }
-    timeout           { fail "(timeout) print_long_arg_list" }
-  }
 }
 
 
@@ -537,35 +659,51 @@ gdb_test continue "Continuing\\..*main \\(\\) at .*call-ar-st.c:1311\[ \t\n\r\]+
 
 
 #call sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)
-send_gdb "print sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)\n"
-gdb_expect {
-    -re ".*Sum of the 4 struct values and seed :\[ \t\n\r\]+218.*$gdb_prompt $" {
-        pass "print sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)"
-      }
-    -re ".*$gdb_prompt $" { fail "print sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)" }
-    timeout           { fail "(timeout) sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)" }
-  }
+if ![gdb_skip_stdio_test "print sum_struct_print(...)"] {
+    send_gdb "print sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)\n"
+    gdb_expect {
+       -re ".*Sum of the 4 struct values and seed :\[ \t\n\r\]+218.*$gdb_prompt $" {
+           pass "print sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)"
+       }
+       -re ".*$gdb_prompt $" { 
+           fail "print sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)" 
+       }
+       timeout           { 
+           fail "(timeout) sum_struct_print(10, *struct1, *struct2, *struct3, *struct4)" 
+       }
+    }
+}
 
 
 #call print_struct_rep(*struct1, *struct2, *struct3)
-send_gdb "print print_struct_rep(*struct1, *struct2, *struct3)\n"
-gdb_expect {
-    -re ".*Contents of struct1:\[ \t\n\r\]+        22         0\[ \t\n\r\]+Contents of struct2:\[ \t\n\r\]+        42         0\[ \t\n\r\]+Contents of struct3:\[ \t\n\r\]+        62         0\[ \t\n\r\]+.*$gdb_prompt $" {
-        pass "print print_struct_rep(*struct1, *struct2, *struct3)"
-      }
-    -re ".*$gdb_prompt $" { fail "print print_struct_rep(*struct1, *struct2, *struct3)" }
-    timeout           { fail "(timeout) print_struct_rep(*struct1, *struct2, *struct3)" }
-  }
+if ![gdb_skip_stdio_test "print print_struct_rep(...)"] {
+    send_gdb "print print_struct_rep(*struct1, *struct2, *struct3)\n"
+    gdb_expect_list "print print_struct_rep(*struct1, *struct2, *struct3)" \
+           ".*$gdb_prompt $" {
+       "\[ \t\n\r\]+Contents of struct1:"
+       "\[ \t\n\r\]+        22         0"
+       "\[ \t\n\r\]+Contents of struct2:"
+       "\[ \t\n\r\]+        42         0"
+       "\[ \t\n\r\]+Contents of struct3:"
+       "\[ \t\n\r\]+        62         0"
+    }
+}
 
-send_gdb "print print_one_large_struct(*list1)\n"
-gdb_expect {
-    -re ".*         4         1.*$gdb_prompt $" {
-        pass "print print_one_large_struct(*list1)"
-      }
-    -re ".*$gdb_prompt $" { fail "print print_one_large_struct(*list1)" }
-    timeout           { fail "(timeout) print_one_large_struct(*list1)" }
-  }
+if ![gdb_skip_stdio_test "print print_one_large_struct(...)"] {
+    send_gdb "print print_one_large_struct(*list1)\n"
+    gdb_expect {
+       -re ".*         4         1.*$gdb_prompt $" {
+           pass "print print_one_large_struct(*list1)"
+       }
+       -re ".*$gdb_prompt $" {
+           fail "print print_one_large_struct(*list1)"
+       }
+       timeout           {
+           fail "(timeout) print_one_large_struct(*list1)"
+       }
+    }
+}
 
+set timeout $oldtimeout
 return
 
-~
This page took 0.039414 seconds and 4 git commands to generate.