OLD | NEW |
1 # This testcase is part of GDB, the GNU debugger. | 1 # This testcase is part of GDB, the GNU debugger. |
2 | 2 |
3 # Copyright 2004, 2007-2012 Free Software Foundation, Inc. | 3 # Copyright 2004, 2007-2012 Free Software Foundation, Inc. |
4 | 4 |
5 # This program is free software; you can redistribute it and/or modify | 5 # This program is free software; you can redistribute it and/or modify |
6 # it under the terms of the GNU General Public License as published by | 6 # it under the terms of the GNU General Public License as published by |
7 # the Free Software Foundation; either version 3 of the License, or | 7 # the Free Software Foundation; either version 3 of the License, or |
8 # (at your option) any later version. | 8 # (at your option) any later version. |
9 # | 9 # |
10 # This program is distributed in the hope that it will be useful, | 10 # This program is distributed in the hope that it will be useful, |
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 # GNU General Public License for more details. | 13 # GNU General Public License for more details. |
14 # | 14 # |
15 # You should have received a copy of the GNU General Public License | 15 # You should have received a copy of the GNU General Public License |
16 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 16 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
17 | 17 |
18 # Check that GDB can support multiple watchpoints across threads. | 18 # Check that GDB can support multiple watchpoints across threads. |
19 | 19 |
20 if $tracelevel { | |
21 strace $tracelevel | |
22 } | |
23 | |
24 | 20 |
25 # This test verifies that a watchpoint is detected in the proper thread | 21 # This test verifies that a watchpoint is detected in the proper thread |
26 # so the test is only meaningful on a system with hardware watchpoints. | 22 # so the test is only meaningful on a system with hardware watchpoints. |
27 if {[skip_hw_watchpoint_multi_tests]} { | 23 if {[skip_hw_watchpoint_multi_tests]} { |
28 return 0 | 24 return 0 |
29 } | 25 } |
30 | 26 |
31 proc target_no_stopped_data { } { | 27 proc target_no_stopped_data { } { |
32 return [istarget s390*-*-*] | 28 return [istarget s390*-*-*] |
33 } | 29 } |
34 | 30 |
35 set testfile "watchthreads" | 31 standard_testfile |
36 set srcfile ${testfile}.c | 32 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le debug] != "" } { |
37 set binfile ${objdir}/${subdir}/${testfile} | |
38 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
le [list debug "incdir=${objdir}"]] != "" } { | |
39 return -1 | 33 return -1 |
40 } | 34 } |
41 | 35 |
42 gdb_exit | 36 gdb_exit |
43 gdb_start | 37 gdb_start |
44 gdb_reinitialize_dir $srcdir/$subdir | 38 gdb_reinitialize_dir $srcdir/$subdir |
45 gdb_load ${binfile} | 39 gdb_load ${binfile} |
46 | 40 |
47 gdb_test_no_output "set can-use-hw-watchpoints 1" "" | 41 gdb_test_no_output "set can-use-hw-watchpoints 1" "" |
48 | 42 |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 # may have more than 30 hits total. | 182 # may have more than 30 hits total. |
189 set result [expr $args_0 + $args_1 >= 30] | 183 set result [expr $args_0 + $args_1 >= 30] |
190 } else { | 184 } else { |
191 set result [expr $args_0 + $args_1 == 30] | 185 set result [expr $args_0 + $args_1 == 30] |
192 } | 186 } |
193 if { $result } { | 187 if { $result } { |
194 pass $message | 188 pass $message |
195 } else { | 189 } else { |
196 fail $message | 190 fail $message |
197 } | 191 } |
OLD | NEW |