2015-01-01 09:32:14 +00:00
|
|
|
# Copyright 2009-2015 Free Software Foundation, Inc.
|
2009-11-20 19:57:29 +00:00
|
|
|
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
2011-02-21 14:57:38 +00:00
|
|
|
if {[skip_hw_watchpoint_access_tests]} {
|
|
|
|
return 0
|
2009-11-20 19:57:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
set test watchpoint-hw-hit-once
|
|
|
|
set srcfile ${test}.c
|
|
|
|
if { [prepare_for_testing ${test}.exp ${test} ${srcfile}] } {
|
|
|
|
return -1
|
|
|
|
}
|
|
|
|
|
|
|
|
if ![runto_main] {
|
|
|
|
return -1
|
|
|
|
}
|
|
|
|
|
|
|
|
gdb_test "rwatch watchee"
|
|
|
|
|
2014-08-12 01:14:08 +00:00
|
|
|
gdb_breakpoint [gdb_get_line_number "dummy = 2"]
|
2009-11-20 19:57:29 +00:00
|
|
|
|
|
|
|
gdb_test "continue" "Continuing.\r\nHardware read watchpoint \[0-9\]+: watchee\r\n\r\nValue = 0\r\n.*"
|
|
|
|
|
|
|
|
# Here should be no repeated notification of the read watchpoint.
|
|
|
|
gdb_test "continue" \
|
|
|
|
"Continuing\\.\[ \r\n\]+Breakpoint \[0-9\]+, .*break-at-exit.*" \
|
|
|
|
"continue to break-at-exit"
|