| 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 2010-2012 Free Software Foundation, Inc. | 3 # Copyright 2010-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 # Test GDB bug report 11531. | 18 # Test GDB bug report 11531. |
| 19 # This is a problem related to CANNOT_STEP_HW_WATCHPOINTS macro. | 19 # This is a problem related to CANNOT_STEP_HW_WATCHPOINTS macro. |
| 20 # It affects Solaris native targets. | 20 # It affects Solaris native targets. |
| 21 | 21 |
| 22 if $tracelevel then { | |
| 23 strace $tracelevel | |
| 24 } | |
| 25 | |
| 26 | 22 |
| 27 set testfile "gdb11531" | 23 set testfile "gdb11531" |
| 28 | 24 |
| 29 if { [prepare_for_testing $testfile.exp $testfile $testfile.c {debug}] } { | 25 if { [prepare_for_testing $testfile.exp $testfile $testfile.c {debug}] } { |
| 30 return -1; | 26 return -1; |
| 31 } | 27 } |
| 32 | 28 |
| 33 # Disable hardware watchpoints if necessary. | 29 # Disable hardware watchpoints if necessary. |
| 34 if [target_info exists gdb,no_hardware_watchpoints] { | 30 if [target_info exists gdb,no_hardware_watchpoints] { |
| 35 gdb_test_no_output "set can-use-hw-watchpoints 0" "" | 31 gdb_test_no_output "set can-use-hw-watchpoints 0" "" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 57 gdb_test "watch myrec.x" ".*atchpoint \[0-9\]+: myrec\.x" "Set watchpoint" | 53 gdb_test "watch myrec.x" ".*atchpoint \[0-9\]+: myrec\.x" "Set watchpoint" |
| 58 | 54 |
| 59 gdb_test "next" \ | 55 gdb_test "next" \ |
| 60 ".*${nl}.*atchpoint \[0-9\]+: myrec\.x${nl}Old value = 0${nl}New value = 5${
nl}.*" \ | 56 ".*${nl}.*atchpoint \[0-9\]+: myrec\.x${nl}Old value = 0${nl}New value = 5${
nl}.*" \ |
| 61 "watchpoint variable triggers at next" | 57 "watchpoint variable triggers at next" |
| 62 | 58 |
| 63 gdb_test "continue" \ | 59 gdb_test "continue" \ |
| 64 ".*${nl}.*atchpoint \[0-9\]+: myrec\.x${nl}Old value = 5${nl}New value = 78$
{nl}.*" \ | 60 ".*${nl}.*atchpoint \[0-9\]+: myrec\.x${nl}Old value = 5${nl}New value = 78$
{nl}.*" \ |
| 65 "watchpoint variable triggers at continue" | 61 "watchpoint variable triggers at continue" |
| 66 | 62 |
| OLD | NEW |