OLD | NEW |
1 # Copyright 2010-2012 Free Software Foundation, Inc. | 1 # Copyright 2010-2013 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 # Tests involving watchpoint conditions with local expressions. | 17 # Tests involving watchpoint conditions with local expressions. |
18 # | 18 # |
19 | 19 |
20 set testfile "watch-cond" | 20 standard_testfile .c |
21 set srcfile ${testfile}.c | |
22 set binfile ${objdir}/${subdir}/${testfile} | |
23 | 21 |
24 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { | 22 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } { |
25 untested ${testfile}.exp | 23 untested ${testfile}.exp |
26 return -1 | 24 return -1 |
27 } | 25 } |
28 | 26 |
29 # Disable hardware watchpoints if necessary. | 27 # Disable hardware watchpoints if necessary. |
30 if [target_info exists gdb,no_hardware_watchpoints] { | 28 if [target_info exists gdb,no_hardware_watchpoints] { |
31 gdb_test_no_output "set can-use-hw-watchpoints 0" "" | 29 gdb_test_no_output "set can-use-hw-watchpoints 0" "" |
32 } | 30 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 gdb_test "continue" \ | 81 gdb_test "continue" \ |
84 "Old value = 0.*New value = 1.*" \ | 82 "Old value = 0.*New value = 1.*" \ |
85 "watchpoint on global2 variable triggers" | 83 "watchpoint on global2 variable triggers" |
86 | 84 |
87 gdb_test_no_output "condition 2 *foo > 10" \ | 85 gdb_test_no_output "condition 2 *foo > 10" \ |
88 "condition of watchpoint 2 changes" | 86 "condition of watchpoint 2 changes" |
89 | 87 |
90 gdb_test "continue" \ | 88 gdb_test "continue" \ |
91 ".*condition cannot be tested in the current scope.*Old value = 1.*New value
= 2.*" \ | 89 ".*condition cannot be tested in the current scope.*Old value = 1.*New value
= 2.*" \ |
92 "watchpoint stops with untestable local expression" | 90 "watchpoint stops with untestable local expression" |
OLD | NEW |