| OLD | NEW |
| 1 # Copyright 1999-2004, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1999-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 if $tracelevel then { | |
| 19 strace $tracelevel | |
| 20 } | |
| 21 | |
| 22 | 18 |
| 23 # | 19 # |
| 24 # test running programs | 20 # test running programs |
| 25 # | 21 # |
| 26 | 22 |
| 27 if { [skip_cplus_tests] } { continue } | 23 if { [skip_cplus_tests] } { continue } |
| 28 | 24 |
| 29 set testfile "annota2" | 25 standard_testfile .cc |
| 30 set srcfile ${testfile}.cc | |
| 31 set binfile ${objdir}/${subdir}/${testfile} | |
| 32 | 26 |
| 33 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug c++ nowarnings}] != "" } { | 27 if {[prepare_for_testing $testfile.exp $testfile $srcfile \ |
| 34 untested annota2.exp | 28 » {debug c++ nowarnings}]} { |
| 35 return -1 | 29 return -1 |
| 36 } | 30 } |
| 37 | 31 |
| 38 # are we on a target board? If so, don't run these tests. | 32 # are we on a target board? If so, don't run these tests. |
| 39 # note: this is necessary because we cannot use runto_main (which would | 33 # note: this is necessary because we cannot use runto_main (which would |
| 40 # work for remote targets too) because of the different prompt we get | 34 # work for remote targets too) because of the different prompt we get |
| 41 # when using annotation level 2. | 35 # when using annotation level 2. |
| 42 # | 36 # |
| 43 if [is_remote target] then { | 37 if [is_remote target] then { |
| 44 return 0 | 38 return 0 |
| 45 } | 39 } |
| 46 | 40 |
| 47 | |
| 48 gdb_exit | |
| 49 gdb_start | |
| 50 gdb_reinitialize_dir $srcdir/$subdir | |
| 51 gdb_load ${binfile} | |
| 52 | |
| 53 if [target_info exists gdb_stub] { | |
| 54 gdb_step_for_stub; | |
| 55 } | |
| 56 | |
| 57 # | 41 # |
| 58 # line number where we need to stop in main | 42 # line number where we need to stop in main |
| 59 # | 43 # |
| 60 set main_line 25 | 44 set main_line 25 |
| 61 | 45 |
| 62 # The commands we test here produce many lines of output; disable "press | 46 # The commands we test here produce many lines of output; disable "press |
| 63 # <return> to continue" prompts. | 47 # <return> to continue" prompts. |
| 64 gdb_test_no_output "set height 0" | 48 gdb_test_no_output "set height 0" |
| 65 | 49 |
| 66 # | 50 # |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 # FIXME: the testsuite does not currently have tests for | 186 # FIXME: the testsuite does not currently have tests for |
| 203 # annotate_catchpoints and annotate_function_call | 187 # annotate_catchpoints and annotate_function_call |
| 204 # and a few variants of the annotations that are | 188 # and a few variants of the annotations that are |
| 205 # tested (marked by FIXME on the annot?.exp files) | 189 # tested (marked by FIXME on the annot?.exp files) |
| 206 # | 190 # |
| 207 | 191 |
| 208 # reinstall the old prompt for the rest of the testsuite. | 192 # reinstall the old prompt for the rest of the testsuite. |
| 209 | 193 |
| 210 set gdb_prompt $old_gdb_prompt | 194 set gdb_prompt $old_gdb_prompt |
| 211 | 195 |
| OLD | NEW |