]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/testsuite/gdb.base/watchpoint-hw.exp
Update copyright year range in header of all files managed by GDB
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.base / watchpoint-hw.exp
CommitLineData
1d506c26 1# Copyright 2008-2024 Free Software Foundation, Inc.
db2ad4c3
JK
2
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
5# the Free Software Foundation; either version 3 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
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/>.
15
8ce7423f 16require !use_gdb_stub
b800ec70 17
e379cbb1 18require allow_hw_watchpoint_tests
db2ad4c3 19
62cef515
TT
20standard_testfile
21
5b362f04 22if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
db2ad4c3
JK
23 return -1
24}
25
db2ad4c3
JK
26# Create the watchpoint before the inferior gets started. Now the native CPU
27# target is still not active and its `to_can_use_hw_breakpoint' is not
28# installed, therefore only a software watchpoint gets created.
29
30gdb_test "watch watchee" "atchpoint 1: watchee"
31
32# `runto_main' or `runto main' would delete the watchpoint created above.
33
34if { [gdb_start_cmd] < 0 } {
4a6bdfb9 35 fail start
db2ad4c3
JK
36 return -1
37}
38gdb_test "" "main .* at .*" "start"
39
40# Check it is really a `hw'-watchpoint.
41gdb_test "info watchpoints" "1 *hw watchpoint .* watchee"