| OLD | NEW |
| 1 # Copyright 1998, 2005, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1998, 2005, 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 load_lib "trace-support.exp" | 16 load_lib "trace-support.exp" |
| 17 | 17 |
| 18 if $tracelevel then { | |
| 19 strace $tracelevel | |
| 20 } | |
| 21 | 18 |
| 19 standard_testfile |
| 20 set executable $testfile |
| 22 | 21 |
| 23 set testfile "collection" | 22 if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} { |
| 24 set srcfile ${testfile}.c | |
| 25 set executable $testfile | |
| 26 set binfile $objdir/$subdir/$executable | |
| 27 | |
| 28 if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile \ | |
| 29 » executable {debug nowarnings}] != "" } { | |
| 30 untested collection.exp | |
| 31 return -1 | 23 return -1 |
| 32 } | 24 } |
| 33 | 25 |
| 34 # Tests: | 26 # Tests: |
| 35 # 1) $args | 27 # 1) $args |
| 36 # 2) function args by name | 28 # 2) function args by name |
| 37 # 3) $locs | 29 # 3) $locs |
| 38 # 4) function locals by name | 30 # 4) function locals by name |
| 39 # 5) $regs | 31 # 5) $regs |
| 40 # 6) registers by name ($sp, $fp?) | 32 # 6) registers by name ($sp, $fp?) |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 gdb_collect_return_test | 765 gdb_collect_return_test |
| 774 | 766 |
| 775 gdb_collect_strings_test strings_test_func "locstr" "abcdef" "" \ | 767 gdb_collect_strings_test strings_test_func "locstr" "abcdef" "" \ |
| 776 "local string" | 768 "local string" |
| 777 | 769 |
| 778 gdb_collect_strings_test strings_test_func "longloc" "how now brown c" 15 \ | 770 gdb_collect_strings_test strings_test_func "longloc" "how now brown c" 15 \ |
| 779 "long local string" | 771 "long local string" |
| 780 | 772 |
| 781 } | 773 } |
| 782 | 774 |
| 783 clean_restart $executable | |
| 784 runto_main | 775 runto_main |
| 785 | 776 |
| 786 # We generously give ourselves one "pass" if we successfully | |
| 787 # detect that this test cannot be run on this target! | |
| 788 if { ![gdb_target_supports_trace] } then { | 777 if { ![gdb_target_supports_trace] } then { |
| 789 pass "Current target does not support trace" | 778 unsupported "Current target does not support trace" |
| 790 return 1; | 779 return 1; |
| 791 } | 780 } |
| 792 | 781 |
| 793 # Body of test encased in a proc so we can return prematurely. | 782 # Body of test encased in a proc so we can return prematurely. |
| 794 gdb_trace_collection_test | 783 gdb_trace_collection_test |
| 795 | 784 |
| 796 # Finished! | 785 # Finished! |
| 797 gdb_test "tfind none" ".*" "" | 786 gdb_test "tfind none" ".*" "" |
| OLD | NEW |