OLD | NEW |
1 # Copyright 1999, 2007-2012 Free Software Foundation, Inc. | 1 # Copyright 1999, 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 | 16 |
17 if $tracelevel then { | |
18 strace $tracelevel | |
19 } | |
20 | |
21 # | 17 # |
22 # test running programs | 18 # test running programs |
23 # | 19 # |
24 | 20 |
25 set testfile "async" | 21 set testfile "async" |
26 set srcfile ${testfile}.c | 22 set srcfile ${testfile}.c |
27 set binfile ${objdir}/${subdir}/${testfile} | 23 set binfile ${objdir}/${subdir}/${testfile} |
28 | 24 |
29 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug nowarnings}] != "" } { | 25 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
ug nowarnings}] != "" } { |
30 untested async.exp | 26 untested async.exp |
31 return -1 | 27 return -1 |
32 } | 28 } |
33 | 29 |
34 if [get_compiler_info ${binfile}] { | 30 if [get_compiler_info] { |
35 return -1 | 31 return -1 |
36 } | 32 } |
37 | 33 |
38 ######################################## | 34 ######################################## |
39 ## | 35 ## |
40 ## Don't do any of these tests until we reach consensus on this file. | 36 ## Don't do any of these tests until we reach consensus on this file. |
41 ## | 37 ## |
42 return 0 | 38 return 0 |
43 ######################################## | 39 ######################################## |
44 | 40 |
45 set board [target_info name] | 41 set board [target_info name] |
46 set current_target [target_info gdb_protocol] | 42 set current_target [target_info gdb_protocol] |
47 if { $current_target == "remote" } { | 43 if { $current_target == "remote" } { |
48 unset_board_info "gdb_protocol" | 44 unset_board_info "gdb_protocol" |
49 set_board_info "gdb_protocol" "async" | 45 set_board_info "gdb_protocol" "async" |
50 } else { | 46 } else { |
51 return 0 | 47 return 0 |
52 } | 48 } |
53 | 49 |
54 gdb_exit | 50 gdb_exit |
55 gdb_start | 51 gdb_start |
56 gdb_reinitialize_dir $srcdir/$subdir | 52 gdb_reinitialize_dir $srcdir/$subdir |
57 gdb_load ${binfile} | 53 gdb_load ${binfile} |
58 if [target_info exists gdb_stub] { | |
59 gdb_step_for_stub; | |
60 } | |
61 | 54 |
62 # | 55 # |
63 # set it up at a breakpoint so we can play with it | 56 # set it up at a breakpoint so we can play with it |
64 # | 57 # |
65 if ![runto_main] then { | 58 if ![runto_main] then { |
66 perror "couldn't run to breakpoint" | 59 perror "couldn't run to breakpoint" |
67 continue | 60 continue |
68 } | 61 } |
69 | 62 |
70 gdb_test "break baz" ".*" "" | 63 gdb_test "break baz" ".*" "" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 gdb_test "set display-exec-done off" ".*" "" | 131 gdb_test "set display-exec-done off" ".*" "" |
139 | 132 |
140 unset_board_info "gdb_protocol" | 133 unset_board_info "gdb_protocol" |
141 set_board_info "gdb_protocol" "remote" | 134 set_board_info "gdb_protocol" "remote" |
142 | 135 |
143 | 136 |
144 | 137 |
145 | 138 |
146 | 139 |
147 | 140 |
OLD | NEW |