]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/testsuite/gdb.arch/aix-sighandle.exp
[gdb/testsuite] Fix failure in gdb.threads/signal-sigtrap.exp
[thirdparty/binutils-gdb.git] / gdb / testsuite / gdb.arch / aix-sighandle.exp
1 # Copyright 2018-2024 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 require {istarget "powerpc*-*-aix*"}
17
18 if { [prepare_for_testing "failed to prepare" aix-sighandle aix-sighandle.c] } {
19 return -1
20 }
21
22 set srcfile aix-sighandle.c
23 set binfile aix-sighandle
24
25 gdb_test "break sig_handle_aix" \
26 "Breakpoint.1.at.*:.file.*$srcfile,.line.22." \
27 "breakpoint sig_handle_aix"
28 gdb_test "run" \
29 "Starting.program:.*$binfile.*\r\nProgram.received.signal.SIGSEGV,.*\r\n.*.in.foo.*.at.*$srcfile:29.*" \
30 "run to breakpoint sig_handle_aix"
31
32 gdb_test "continue" \
33 "Continuing.*Breakpoint.1,.sig_handle_aix..signo=11..at.*$srcfile:22.*" \
34 "continue to breakpoint sig_handle_aix"
35
36 gdb_test_sequence "backtrace" "backtrace for sighandle" {
37 "\[\r\n\]+#0 .* sig_handle_aix \\(signo=11\\) at "
38 "\[\r\n\]+#1 .* .signal.handler.called."
39 "\[\r\n\]+#2 .* foo \\(\\) at "
40 "\[\r\n\]+#3 .* main \\(\\) at "
41 }