[PATCH 16/57][Arm][GAS] Add support for MVE instructions: vdup, vddup, vdwdup, vidup...
[binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-watch-nonstop.exp
blob06f4a5760e4a7d3ff420ca1af21ac8b91c578b62
1 #   Copyright 2011-2019 Free Software Foundation, Inc.
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.
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.
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/>.
16 if [target_info exists gdb,no_hardware_watchpoints] {
17     return -1
20 if { ![support_displaced_stepping] } { 
21     unsupported "displaced stepping"
22     return -1
25 load_lib mi-support.exp
26 set MIFLAGS "-i=mi"
28 gdb_exit
29 if {[mi_gdb_start]} {
30     continue
33 proc mi_nonstop_resume { command test } {
34     if { [mi_send_resuming_command $command $test] != 0 } {
35         # If a resume fails, assume non-stop is broken or unsupported
36         # for this target.  We have logged a FAIL or UNSUPPORTED; skip
37         # the remaining tests to limit timeouts.
38         return -code continue
39     }
43 # Start here
45 standard_testfile watch-nonstop.c
47 if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" } {
48     return -1
51 mi_gdb_reinitialize_dir $srcdir/$subdir
52 mi_gdb_load $binfile
54 mi_gdb_test "-gdb-set non-stop 1" ".*"
55 mi_gdb_test "-gdb-set mi-async 1" ".*"
56 mi_detect_async
58 if { [mi_run_to_main] < 0 } {
59     continue
62 # Set a watchpoint.
63 mi_gdb_test "111-break-watch global" \
64     "111\\^done,wpt=\{number=\"2\",exp=\"global\"\}" \
65     "break-watch operation"
67 # Set the target running.
68 mi_nonstop_resume "exec-continue" "resume 1"
70 # Now try deleting the watchpoint.  This would fail with "Couldn't
71 # write debug register: No such process."  on GNU/Linux, because we'd
72 # try to poke at the debug registers of a running thread.
73 mi_gdb_test "777-break-delete 2" \
74     "777\\^done" \
75     "delete watchpoint"