563cb1a95cfb8c254ecc0c62d77f19c99d26e48e
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.arch / aarch64-dbreg-contents.exp
1 # Copyright 2019-2021 Free Software Foundation, Inc.
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 #
16 # Make sure that the inferior doesn't assert and exits successfully.
17 #
18 # This test checks that GDB does not alter watchpoints set by an inferior.
19 # It sets a watchpoint on memory then writes to the watched memory.
20 # It will exit with 2 if the watchpoint is not reached.
21 #
22 # See PR breakpoints/21870.
23
24 if {![is_aarch64_target]} {
25 verbose "Skipping ${gdb_test_file_name}."
26 return
27 }
28
29 standard_testfile .c
30
31 if { [prepare_for_testing "failed to prepare" ${testfile}] } {
32 return
33 }
34
35 runto_main
36 set test "continue to exit"
37 gdb_test_multiple "continue" "$test" {
38 -re "exited with code 01.*$gdb_prompt $" {
39 # For case that the PTRACE_SETREGSET call fails.
40 pass "$test"
41 }
42 -re "exited normally.*$gdb_prompt $" {
43 pass "$test"
44 }
45 }
This page took 0.031063 seconds and 3 git commands to generate.