]>
Commit | Line | Data |
---|---|---|
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 | 16 | require !use_gdb_stub |
b800ec70 | 17 | |
e379cbb1 | 18 | require allow_hw_watchpoint_tests |
db2ad4c3 | 19 | |
62cef515 TT |
20 | standard_testfile |
21 | ||
5b362f04 | 22 | if {[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 | ||
30 | gdb_test "watch watchee" "atchpoint 1: watchee" | |
31 | ||
32 | # `runto_main' or `runto main' would delete the watchpoint created above. | |
33 | ||
34 | if { [gdb_start_cmd] < 0 } { | |
4a6bdfb9 | 35 | fail start |
db2ad4c3 JK |
36 | return -1 |
37 | } | |
38 | gdb_test "" "main .* at .*" "start" | |
39 | ||
40 | # Check it is really a `hw'-watchpoint. | |
41 | gdb_test "info watchpoints" "1 *hw watchpoint .* watchee" |