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."
}
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"}
}
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 {
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."
}
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"
#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
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
-~