OSDN Git Service

2000-04-26 Michael Snyder <msnyder@seadog.cygnus.com>
authormsnyder <msnyder>
Thu, 27 Apr 2000 00:45:18 +0000 (00:45 +0000)
committermsnyder <msnyder>
Thu, 27 Apr 2000 00:45:18 +0000 (00:45 +0000)
        * gdb.base/call-ar-st.exp: Bail out if target is sparclet.
        This test depends on parsing the printf output from the target.
        Since the sparclet stub doesn't do stdio, this will never work.
        * gdb.base/call-rt-st.exp: ditto.
        * gdb.base/call-strs: ditto.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/call-ar-st.exp
gdb/testsuite/gdb.base/call-rt-st.exp
gdb/testsuite/gdb.base/call-strs.exp

index 8218c23..6423ee2 100644 (file)
@@ -1,3 +1,11 @@
+2000-04-26  Michael Snyder  <msnyder@seadog.cygnus.com>
+
+       * gdb.base/call-ar-st.exp: Bail out if target is sparclet.
+       This test depends on parsing the printf output from the target.
+       Since the sparclet stub doesn't do stdio, this will never work.
+       * gdb.base/call-rt-st.exp: ditto.
+       * gdb.base/call-strs: ditto.
+
 2000-04-24  Michael Snyder  <msnyder@seadog.cygnus.com>
 
        * gdb.base/miscexprs.exp: make sizeof long array test portable.
index 6e90ecd..3744528 100644 (file)
@@ -32,6 +32,10 @@ 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."
@@ -568,4 +572,4 @@ gdb_expect {
 
 return
 
-~
+
index 12ca14c..3838269 100644 (file)
@@ -36,6 +36,11 @@ 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 additional_flags=-w}] != "" } {
      gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
     }
@@ -122,8 +127,10 @@ gdb_expect {
 
 send_gdb "finish\n"
 gdb_expect {
- -re  "Run till exit from .0  loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:514\[ \t\r\n\]+514\[\t \]+return 0;.*$gdb_prompt $" {
-                 pass "finish out from  loop_count"}
+ -re  "Run till exit from .0  loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:617\[ \t\r\n\]+617\[\t \]+return 0;.*$gdb_prompt $" {
+                 pass "finish out from  loop_count (line 617)"}
+ -re  "Run till exit from .0  loop_count \\(\\) at.*call-rt-st.c:106\[ \t\r\n\]+main \\(\\) at.*call-rt-st.c:615\[ \t\r\n\]+615\[\t \]+loop_count.*$gdb_prompt $" {
+                 pass "finish out from  loop_count (line 615)"}
       -re ".*$gdb_prompt $" { fail "finish out from loop_count"}           
       timeout           { fail "(timeout)finish out from loop_count"}
 }
@@ -147,25 +154,25 @@ gdb_expect {
     timeout           { fail "(timeout) print_one_large_struct(*list1)" }
   }
 
-send_gdb "print print_one_double(*d1)\n"
-gdb_expect {
+if {![target_info exists gdb,skip_float_tests]} {
+  send_gdb "print print_one_double(*d1)\n"
+  gdb_expect {
     -re ".*Contents of one_double_t:\[ \r\n\]+1\\.111110\[ \r\n\]+.\[0-9\]+ = \{double1 = 1\\.11111\}.*$gdb_prompt $" {
-        pass "print print_one_double(*d1)"
-      }
+      pass "print print_one_double(*d1)"
+    }
     -re ".*$gdb_prompt $" { fail "print print_one_double(*d1)" }
     timeout           { fail "(timeout) print_one_double(*d1)" }
   }
 
-
-
-send_gdb "print print_two_floats(*f3)\n"
-gdb_expect {
+  send_gdb "print print_two_floats(*f3)\n"
+  gdb_expect {
     -re ".*Contents of two_floats_t:\[ \r\n\]+-2\\.345000\[ \t]+1\\.000000\[ \r\n\]+.\[0-9\]+ = \{float1 = -2\\.34500003, float2 = 1\}.*$gdb_prompt $" {
-        pass "print print_two_floats(*f3)"
-      }
+      pass "print print_two_floats(*f3)"
+    }
     -re ".*$gdb_prompt $" { fail "print print_two_floats(*f3)" }
     timeout           { fail "(timeout) print_two_floats(*f3)" }
   }
+}
 
 send_gdb "print print_bit_flags(*flags)\n"
 gdb_expect {
index 20f358a..5e6cbff 100644 (file)
@@ -37,6 +37,11 @@ set testfile "call-strs"
 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."
 }
@@ -91,6 +96,7 @@ send_gdb "set print sevenbit-strings\n" ; gdb_expect -re "$gdb_prompt $"
 send_gdb "set print address off\n" ; gdb_expect -re "$gdb_prompt $"
 send_gdb "set width 0\n" ; gdb_expect -re "$gdb_prompt $"
 
+set timeout 120
 
 if ![runto_main] then {
     perror "couldn't run to breakpoint"
@@ -107,11 +113,11 @@ gdb_expect {
 
 
 #step
-send_gdb "step\n"
+send_gdb "next\n"
 gdb_expect {
-        -re ".*str_func\\(\"abcd\", \"efgh\", \"ijkl\", \"mnop\", \"qrst\", \"uvwx\", \"yz12\"\\);.*$gdb_prompt $" {pass "step after strcpy"}
-        -re ".*$gdb_prompt $" { fail "step after strcpy" }
-        timeout { fail "step after strcpy (timeout)" }
+        -re ".*str_func\\(\"abcd\", \"efgh\", \"ijkl\", \"mnop\", \"qrst\", \"uvwx\", \"yz12\"\\);.*$gdb_prompt $" {pass "next over strcpy"}
+        -re ".*$gdb_prompt $" { fail "next over strcpy" }
+        timeout { fail "next over strcpy (timeout)" }
     }
 
 #print buf
@@ -217,26 +223,25 @@ gdb_expect {
     timeout           { fail "(timeout) call str_func(\"a\",\"b\",\"c\",\"d\",\"e\",\"f\",\"g\")" }
   }
 
-#print str_func(s,s,s,s,s,s,s,s)
-send_gdb "print  str_func(s,s,s,s,s,s,s,s)\n"
+#print str_func(s,s,s,s,s,s,s)
+send_gdb "print  str_func(s,s,s,s,s,s,s)\n"
 gdb_expect {
     -re "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+.*\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*$gdb_prompt $" {
-        pass "print str_func(s,s,s,s,s,s,s,s)"
+        pass "print str_func(s,s,s,s,s,s,s)"
       }
-    -re ".*$gdb_prompt $" { fail "print str_func(s,s,s,s,s,s,s,s)" }
-    timeout           { fail "(timeout) print str_func(s,s,s,s,s,s,s,s)" }
+    -re ".*$gdb_prompt $" { fail "print str_func(s,s,s,s,s,s,s)" }
+    timeout           { fail "(timeout) print str_func(s,s,s,s,s,s,s)" }
   }
 
-#call str_func(s,s,s,s,s,s,s,s)
-send_gdb "call  str_func(s,s,s,s,s,s,s,s)\n"
+#call str_func(s,s,s,s,s,s,s)
+send_gdb "call  str_func(s,s,s,s,s,s,s)\n"
 gdb_expect {
     -re "first string arg is: test string\[ \t\r\n\]+second string arg is: test string\[ \t\r\n\]+third string arg is: test string\[ \t\r\n\]+fourth string arg is: test string\[ \t\r\n\]+fifth string arg is: test string\[ \t\r\n\]+sixth string arg is: test string\[ \t\r\n\]+seventh string arg is: test string\[ \t\r\n\]+.*\"test stringtest stringtest stringtest stringtest stringtest stringtest string\".*$gdb_prompt $" {
-        pass "call str_func(s,s,s,s,s,s,s,s)"
+        pass "call str_func(s,s,s,s,s,s,s)"
       }
-    -re ".*$gdb_prompt $" { fail "call str_func(s,s,s,s,s,s,s,s)" }
-    timeout           { fail "(timeout) call str_func(s,s,s,s,s,s,s,s)" }
+    -re ".*$gdb_prompt $" { fail "call str_func(s,s,s,s,s,s,s)" }
+    timeout           { fail "(timeout) call str_func(s,s,s,s,s,s,s)" }
   }
 
 gdb_exit
 return 0
-~