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 2009-2012 Free Software Foundation, Inc. | 3 # Copyright 2009-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, |
(...skipping 13 matching lines...) Expand all Loading... |
24 # "show breakpoint always-inserted" being "off". Formerly the remembered hit | 24 # "show breakpoint always-inserted" being "off". Formerly the remembered hit |
25 # could be assigned during continuation of a thread with pending SIGTRAP to the | 25 # could be assigned during continuation of a thread with pending SIGTRAP to the |
26 # different/new watchpoint, just based on the watchpoint/debug register number. | 26 # different/new watchpoint, just based on the watchpoint/debug register number. |
27 | 27 |
28 if {[skip_hw_watchpoint_access_tests] | 28 if {[skip_hw_watchpoint_access_tests] |
29 || [skip_hw_watchpoint_multi_tests] | 29 || [skip_hw_watchpoint_multi_tests] |
30 || ![istarget *-*-linux*]} { | 30 || ![istarget *-*-linux*]} { |
31 return 0 | 31 return 0 |
32 } | 32 } |
33 | 33 |
34 set testfile "watchthreads-reorder" | 34 standard_testfile |
35 set srcfile ${testfile}.c | |
36 set binfile ${objdir}/${subdir}/${testfile} | |
37 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable
[list debug additional_flags=-lrt]] != "" } { | 35 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable
[list debug additional_flags=-lrt]] != "" } { |
38 return -1 | 36 return -1 |
39 } | 37 } |
40 | 38 |
41 foreach reorder {0 1} { | 39 foreach reorder {0 1} { with_test_prefix "reorder$reorder" { |
42 | |
43 global pf_prefix | |
44 set prefix_test $pf_prefix | |
45 lappend pf_prefix "reorder$reorder:" | |
46 | 40 |
47 clean_restart $testfile | 41 clean_restart $testfile |
48 | 42 |
49 gdb_test "set can-use-hw-watchpoints 1" | 43 gdb_test "set can-use-hw-watchpoints 1" |
50 | 44 |
51 if ![runto_main] { | 45 if ![runto_main] { |
52 return -1 | 46 return -1 |
53 } | 47 } |
54 | 48 |
55 # Use "rwatch" as "watch" would report the watchpoint changed just based on
its | 49 # Use "rwatch" as "watch" would report the watchpoint changed just based on
its |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 84 |
91 gdb_test "continue" \ | 85 gdb_test "continue" \ |
92 "Hardware read watchpoint \[0-9\]+: thread\[12\]_rwatch\r\n\r\nValu
e = 0\r\n0x\[0-9a-f\]+ in thread\[12\]_func .*" \ | 86 "Hardware read watchpoint \[0-9\]+: thread\[12\]_rwatch\r\n\r\nValu
e = 0\r\n0x\[0-9a-f\]+ in thread\[12\]_func .*" \ |
93 "continue b" | 87 "continue b" |
94 | 88 |
95 # While the debug output itself is not checked in this testcase one bug was | 89 # While the debug output itself is not checked in this testcase one bug was |
96 # found in the DEBUG_INFRUN code path. | 90 # found in the DEBUG_INFRUN code path. |
97 gdb_test "set debug infrun 1" | 91 gdb_test "set debug infrun 1" |
98 | 92 |
99 gdb_continue_to_breakpoint "break-at-exit" ".*break-at-exit.*" | 93 gdb_continue_to_breakpoint "break-at-exit" ".*break-at-exit.*" |
100 | 94 }} |
101 set pf_prefix $prefix_test | |
102 } | |
OLD | NEW |