1 # Copyright (C) 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/>.
18 if { ![can_single_step_to_signal_handler] } {
19 untested "cannot single-step to signal handler"
23 if [target_info exists gdb,nosignals] {
24 verbose "Skipping kill-after-signal.exp because of nosignals."
28 if [prepare_for_testing "failed to prepare" ${testfile}] {
32 gdb_test "handle SIGUSR1 stop print pass" "SIGUSR1\[ \t\]+Yes\[ \t\]+Yes\[ \t\]+Yes\[ \t\]+.*"
38 gdb_test "continue" "Program received signal SIGUSR1, .*"
39 gdb_test "stepi" "\r\nhandler .*"
40 gdb_test_multiple "kill" "kill" {
41 -re "Kill the program being debugged\\? \\(y or n\\) $" {
42 gdb_test "y" "\\\[Inferior $decimal \\(.*\\) killed\\\]" "kill"