OLD | NEW |
1 # This testcase is part of GDB, the GNU debugger. | 1 # This testcase is part of GDB, the GNU debugger. |
2 | 2 |
3 # Copyright 2004, 2007-2012 Free Software Foundation, Inc. | 3 # Copyright 2004, 2007-2012 Free Software Foundation, Inc. |
4 | 4 |
5 # This program is free software; you can redistribute it and/or modify | 5 # This program is free software; you can redistribute it and/or modify |
6 # it under the terms of the GNU General Public License as published by | 6 # it under the terms of the GNU General Public License as published by |
7 # the Free Software Foundation; either version 3 of the License, or | 7 # the Free Software Foundation; either version 3 of the License, or |
8 # (at your option) any later version. | 8 # (at your option) any later version. |
9 # | 9 # |
10 # This program is distributed in the hope that it will be useful, | 10 # This program is distributed in the hope that it will be useful, |
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 # GNU General Public License for more details. | 13 # GNU General Public License for more details. |
14 # | 14 # |
15 # You should have received a copy of the GNU General Public License | 15 # You should have received a copy of the GNU General Public License |
16 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 |
18 # Test "return", "finish", and "call" of functions that a scalar (int, | 18 # Test "return", "finish", and "call" of functions that a scalar (int, |
19 # float, enum) and/or take a single scalar parameter. | 19 # float, enum) and/or take a single scalar parameter. |
20 | 20 |
21 if $tracelevel then { | |
22 strace $tracelevel | |
23 } | |
24 | |
25 | 21 |
26 # Some targets can't call functions, so don't even bother with this | 22 # Some targets can't call functions, so don't even bother with this |
27 # test. | 23 # test. |
28 | 24 |
29 if [target_info exists gdb,cannot_call_functions] { | 25 if [target_info exists gdb,cannot_call_functions] { |
30 setup_xfail "*-*-*" | 26 setup_xfail "*-*-*" |
31 fail "This target can not call functions" | 27 fail "This target can not call functions" |
32 continue | 28 continue |
33 } | 29 } |
34 | 30 |
35 set testfile "call-sc" | 31 set testfile "call-sc" |
36 set srcfile ${testfile}.c | 32 set srcfile ${testfile}.c |
37 set binfile ${objdir}/${subdir}/${testfile} | 33 set binfile ${objdir}/${subdir}/${testfile} |
38 | 34 |
39 # Create and source the file that provides information about the | 35 # Create and source the file that provides information about the |
40 # compiler used to compile the test case. | 36 # compiler 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 # Compile a variant of scalars.c using TYPE to specify the type of the | 42 # Compile a variant of scalars.c using TYPE to specify the type of the |
47 # parameter and return-type. Run the compiled program up to "main". | 43 # parameter and return-type. Run the compiled program up to "main". |
48 # Also updates the global "testfile" to reflect the most recent build. | 44 # Also updates the global "testfile" to reflect the most recent build. |
49 | 45 |
50 proc start_scalars_test { type } { | 46 proc start_scalars_test { type } { |
51 global testfile | 47 global testfile |
52 global srcfile | 48 global srcfile |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 test_scalar_calls | 452 test_scalar_calls |
457 test_scalar_returns | 453 test_scalar_returns |
458 } | 454 } |
459 | 455 |
460 # Approx size: 4, 8, ... | 456 # Approx size: 4, 8, ... |
461 start_scalars_test te | 457 start_scalars_test te |
462 test_scalar_calls | 458 test_scalar_calls |
463 test_scalar_returns | 459 test_scalar_returns |
464 | 460 |
465 return 0 | 461 return 0 |
OLD | NEW |