OLD | NEW |
1 # Copyright 1998-2001, 2004, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1998-2001, 2004, 2007-2012 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 |
16 # This file was written by Elena Zannoni (ezannoni@cygnus.com) | 16 # This file was written by Elena Zannoni (ezannoni@cygnus.com) |
17 | 17 |
18 | 18 |
19 if $tracelevel then { | |
20 strace $tracelevel | |
21 } | |
22 | |
23 | 19 |
24 set testfile "call-ar-st" | 20 set testfile "call-ar-st" |
25 set srcfile ${testfile}.c | 21 set srcfile ${testfile}.c |
26 set binfile ${objdir}/${subdir}/${testfile} | 22 set binfile ${objdir}/${subdir}/${testfile} |
27 | 23 |
28 # Test depends on printf, which the sparclet stub doesn't support. | 24 # Test depends on printf, which the sparclet stub doesn't support. |
29 if { [istarget "sparclet-*-*"] } { | 25 if { [istarget "sparclet-*-*"] } { |
30 return 0; | 26 return 0; |
31 } | 27 } |
32 | 28 |
33 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { | 29 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug}] != "" } { |
34 untested "couldn't compile ${srcdir}/${subdir}/${srcfile}" | 30 untested "couldn't compile ${srcdir}/${subdir}/${srcfile}" |
35 return -1 | 31 return -1 |
36 } | 32 } |
37 | 33 |
38 | 34 |
39 # Create and source the file that provides information about the compiler | 35 # Create and source the file that provides information about the compiler |
40 # used to compile the test case. | 36 # used to compile the test case. |
41 | 37 |
42 if [get_compiler_info ${binfile}] { | 38 if [get_compiler_info] { |
43 return -1; | 39 return -1; |
44 } | 40 } |
45 | 41 |
46 # Some targets can't call functions, so don't even bother with this | 42 # Some targets can't call functions, so don't even bother with this |
47 # test. | 43 # test. |
48 if [target_info exists gdb,cannot_call_functions] { | 44 if [target_info exists gdb,cannot_call_functions] { |
49 setup_xfail "*-*-*" 2416 | 45 setup_xfail "*-*-*" 2416 |
50 fail "This target can not call functions" | 46 fail "This target can not call functions" |
51 continue | 47 continue |
52 } | 48 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 "student id :\[\t \]+.*YELLOW" | 154 "student id :\[\t \]+.*YELLOW" |
159 "array_i :" | 155 "array_i :" |
160 "main \\(\\) at .*call-ar-st.c:1220\[ \t\r\n\]+.*print_all_arrays\\(inte
ger_array, char_array, float_array, double_array\\)." | 156 "main \\(\\) at .*call-ar-st.c:1220\[ \t\r\n\]+.*print_all_arrays\\(inte
ger_array, char_array, float_array, double_array\\)." |
161 } | 157 } |
162 } else { | 158 } else { |
163 gdb_test "continue" ".*" "" | 159 gdb_test "continue" ".*" "" |
164 } | 160 } |
165 | 161 |
166 #step | 162 #step |
167 gdb_test "step" \ | 163 gdb_test "step" \ |
168 "print_all_arrays \\(array_i=, array_c=.ZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZa
ZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZa
ZaZa., array_f=, array_d=\\) at .*call-ar-st.c:306\[ \t\r\n\]+306.*print_int_arr
ay\\(array_i\\);.*" \ | 164 "print_all_arrays \\(array_i=<integer_array.*>, array_c=<char_array.*> .ZaZa
ZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZa
ZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZaZa., array_f=<float_array.*>, array_d=<double_
array.*>\\) at .*call-ar-st.c:306\[ \t\r\n\]+306.*print_int_array\\(array_i\\);.
*" \ |
169 "step inside print_all_arrays" | 165 "step inside print_all_arrays" |
170 | 166 |
171 #step -over | 167 #step -over |
172 if ![gdb_skip_stdio_test "next over print_int_array in print_all_arrays"] { | 168 if ![gdb_skip_stdio_test "next over print_int_array in print_all_arrays"] { |
173 gdb_test "next" \ | 169 gdb_test "next" \ |
174 "array_i :.*307.*print_char_array.*" \ | 170 "array_i :.*307.*print_char_array.*" \ |
175 "next over print_int_array in print-all_arrays" | 171 "next over print_int_array in print-all_arrays" |
176 } else { | 172 } else { |
177 gdb_test "next" ".*" "" | 173 gdb_test "next" ".*" "" |
178 } | 174 } |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 | 566 |
571 if ![gdb_skip_stdio_test "print print_one_large_struct(...)"] { | 567 if ![gdb_skip_stdio_test "print print_one_large_struct(...)"] { |
572 gdb_test "print print_one_large_struct(*list1)" \ | 568 gdb_test "print print_one_large_struct(*list1)" \ |
573 " 4 1.*" \ | 569 " 4 1.*" \ |
574 "print print_one_large_struct(*list1)" | 570 "print print_one_large_struct(*list1)" |
575 } | 571 } |
576 | 572 |
577 set timeout $oldtimeout | 573 set timeout $oldtimeout |
578 return | 574 return |
579 | 575 |
OLD | NEW |