OLD | NEW |
1 # manythreads.exp -- Expect script to test stopping many threads | 1 # manythreads.exp -- Expect script to test stopping many threads |
2 # Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. | 2 # Copyright (C) 2004, 2006-2012 Free Software Foundation, Inc. |
3 | 3 |
4 # This program is free software; you can redistribute it and/or modify | 4 # This program is free software; you can redistribute it and/or modify |
5 # it under the terms of the GNU General Public License as published by | 5 # it under the terms of the GNU General Public License as published by |
6 # the Free Software Foundation; either version 3 of the License, or | 6 # the Free Software Foundation; either version 3 of the License, or |
7 # (at your option) any later version. | 7 # (at your option) any later version. |
8 # | 8 # |
9 # This program is distributed in the hope that it will be useful, | 9 # This program is distributed in the hope that it will be useful, |
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 # GNU General Public License for more details. | 12 # GNU General Public License for more details. |
13 # | 13 # |
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 |
17 # This file was written by Jeff Johnston. (jjohnstn@redhat.com) | 17 # This file was written by Jeff Johnston. (jjohnstn@redhat.com) |
18 | 18 |
19 if $tracelevel then { | |
20 strace $tracelevel | |
21 } | |
22 | 19 |
| 20 standard_testfile |
23 | 21 |
24 set testfile "manythreads" | 22 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le debug] != "" } { |
25 set srcfile ${testfile}.c | |
26 set binfile ${objdir}/${subdir}/${testfile} | |
27 | |
28 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le [list debug "incdir=${objdir}"]] != "" } { | |
29 return -1 | 23 return -1 |
30 } | 24 } |
31 | 25 |
32 gdb_start | 26 clean_restart ${binfile} |
33 gdb_reinitialize_dir $srcdir/$subdir | |
34 gdb_load ${binfile} | |
35 gdb_test_no_output "set print sevenbit-strings" | 27 gdb_test_no_output "set print sevenbit-strings" |
36 runto_main | 28 runto_main |
37 | 29 |
38 # We'll need this when we send_gdb a ^C to GDB. Need to do it before we | 30 # We'll need this when we send_gdb a ^C to GDB. Need to do it before we |
39 # run the program and gdb starts saving and restoring tty states. | 31 # run the program and gdb starts saving and restoring tty states. |
40 # On Ultrix, we don't need it and it is really slow (because shell_escape | 32 # On Ultrix, we don't need it and it is really slow (because shell_escape |
41 # doesn't use vfork). | 33 # doesn't use vfork). |
42 if ![istarget "*-*-ultrix*"] then { | 34 if ![istarget "*-*-ultrix*"] then { |
43 gdb_test "shell stty intr '^C'" ".*" | 35 gdb_test "shell stty intr '^C'" ".*" |
44 } | 36 } |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 exp_continue | 158 exp_continue |
167 } | 159 } |
168 eof { | 160 eof { |
169 pass "GDB exits after stopping multithreaded program" | 161 pass "GDB exits after stopping multithreaded program" |
170 } | 162 } |
171 timeout { | 163 timeout { |
172 fail "GDB exits after stopping multithreaded program (timeout)" | 164 fail "GDB exits after stopping multithreaded program (timeout)" |
173 } | 165 } |
174 } | 166 } |
175 | 167 |
OLD | NEW |