OLD | NEW |
1 # Copyright (C) 1996-1997, 1999-2004, 2007-2012 Free Software | 1 # Copyright (C) 1996-1997, 1999-2004, 2007-2012 Free Software |
2 # Foundation, Inc. | 2 # 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 Fred Fish. (fnf@cygnus.com) | 17 # This file was written by Fred Fish. (fnf@cygnus.com) |
18 | 18 |
19 if $tracelevel then { | |
20 strace $tracelevel | |
21 } | |
22 | 19 |
23 | 20 standard_testfile |
24 set testfile "pthreads" | |
25 set srcfile ${testfile}.c | |
26 set binfile ${objdir}/${subdir}/${testfile} | |
27 | 21 |
28 # regexp for "horizontal" text (i.e. doesn't include newline or | 22 # regexp for "horizontal" text (i.e. doesn't include newline or |
29 # carriage return) | 23 # carriage return) |
30 set horiz "\[^\n\r\]*" | 24 set horiz "\[^\n\r\]*" |
31 | 25 |
32 if [istarget "*-*-linux"] then { | 26 if [istarget "*-*-linux"] then { |
33 set target_cflags "-D_MIT_POSIX_THREADS" | 27 set target_cflags "-D_MIT_POSIX_THREADS" |
34 } else { | 28 } else { |
35 set target_cflags "" | 29 set target_cflags "" |
36 } | 30 } |
37 | 31 |
38 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le [list debug "incdir=${objdir}"]] != "" } { | 32 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le debug] != "" } { |
39 return -1 | 33 return -1 |
40 } | 34 } |
41 | 35 |
42 | 36 clean_restart ${binfile} |
43 # Start with a fresh gdb. | |
44 | |
45 gdb_exit | |
46 gdb_start | |
47 gdb_reinitialize_dir $srcdir/$subdir | |
48 gdb_load ${binfile} | |
49 | 37 |
50 gdb_test_no_output "set print sevenbit-strings" | 38 gdb_test_no_output "set print sevenbit-strings" |
51 #gdb_test_no_output "set print address off" | 39 #gdb_test_no_output "set print address off" |
52 gdb_test_no_output "set width 0" | 40 gdb_test_no_output "set width 0" |
53 | 41 |
54 # We'll need this when we send_gdb a ^C to GDB. Need to do it before we | 42 # We'll need this when we send_gdb a ^C to GDB. Need to do it before we |
55 # run the program and gdb starts saving and restoring tty states. | 43 # run the program and gdb starts saving and restoring tty states. |
56 # On Ultrix, we don't need it and it is really slow (because shell_escape | 44 # On Ultrix, we don't need it and it is really slow (because shell_escape |
57 # doesn't use vfork). | 45 # doesn't use vfork). |
58 if ![istarget "*-*-ultrix*"] then { | 46 if ![istarget "*-*-ultrix*"] then { |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 clear_xfail "alpha-*-osf*" | 272 clear_xfail "alpha-*-osf*" |
285 if [test_startup] then { | 273 if [test_startup] then { |
286 if [check_control_c] then { | 274 if [check_control_c] then { |
287 warning "Could not stop child with ^C; skipping rest of tests.\n" | 275 warning "Could not stop child with ^C; skipping rest of tests.\n" |
288 return; | 276 return; |
289 } | 277 } |
290 check_backtraces | 278 check_backtraces |
291 } | 279 } |
292 } | 280 } |
293 clear_xfail "alpha-*-osf*" | 281 clear_xfail "alpha-*-osf*" |
OLD | NEW |