Introduce gdb.FinishBreakpoint in Python
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-evsignal.exp
1 # Copyright (C) 2010, 2011 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 if $tracelevel then {
17 strace $tracelevel
18 }
19
20 if {[is_remote target]} {
21 # RuntimeError: Could not find event thread
22 kfail "python/12966" "Signal Thread 3"
23 return -1
24 }
25
26 load_lib gdb-python.exp
27
28 set testfile "py-evsignal"
29 set srcfile py-evthreads.c
30 set binfile ${objdir}/${subdir}/${testfile}
31 set pyfile ${srcdir}/${subdir}/py-events.py
32
33 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
34 return -1
35 }
36 clean_restart $testfile
37
38 if { [skip_python_tests] } { continue }
39
40 gdb_test_no_output "python execfile ('${pyfile}')" ""
41
42 gdb_test "Test_Events" "Event testers registered."
43 gdb_test_no_output "set non-stop on"
44 gdb_test_no_output "set target-async on"
45
46 gdb_run_cmd
47 gdb_test_multiple "" "Signal Thread 3" {
48 -re "event type: stop\r\nstop reason: signal\r\nstop signal: SIGUSR1\r\nthread num: 3\r\nevent type: stop\r\n$gdb_prompt $" {
49 pass "thread 3 was signaled"
50 }
51 -re "The target does not support running in non-stop mode" {
52 unsupported "non-stop mode is unsupported"
53 }
54 }
This page took 0.041448 seconds and 4 git commands to generate.