[PATCH 5/57][Arm][GAS] Add support for MVE instructions: vmull{b,t}
[binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-threads-interrupt.exp
blob6a830d31510f158d160c4b175c687725ad56d4c6
1 # Copyright 2016-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,nointerrupts] {
17     verbose "Skipping mi-threads-interrupt.exp because of nointerrupts."
18     continue
21 load_lib mi-support.exp
22 set MIFLAGS "-i=mi"
24 standard_testfile
26 if {[gdb_compile_pthreads "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" } {
27     return -1
30 # This tests the resolution of PR 20039.
32 # With a multi-threaded inferior and with MI/all-stop, it was not possible
33 # to interrupt it with ctrl-C after a continue.
35 proc test_continue_interrupt { } {
36   global binfile
37   global async
39   gdb_exit
40   if {[mi_gdb_start]} {
41       continue
42   }
44   # Load the binary in gdb...
45   mi_gdb_load $binfile
47   # ... and run it.
48   #
49   # Note this test relies on mi_runto deleting the breakpoint.
50   # A step-over here would mask the bug.
51   mi_runto "all_threads_created"
53   # Consistency check.
54   mi_check_thread_states {"stopped" "stopped" "stopped"} "check thread states"
56   # Continue.
57   mi_send_resuming_command "exec-continue" "continue"
59   # Wait a bit to make sure all MI events are sent, before sending the
60   # interruption request.
61   sleep 1
63   # Send the interrupt request.
64   if { $async } {
65     mi_gdb_test "888-exec-interrupt" "888\\^done" "interrupt"
66   } else {
67     send_gdb "\003"
68   }
70   # Wait for the *stopped.
71   mi_expect_interrupt "interrupt reported"
74 test_continue_interrupt