*** empty log message ***
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.python / py-events.exp
CommitLineData
c17a9e46
HZ
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
c17a9e46
HZ
16if $tracelevel then {
17 strace $tracelevel
18}
19
20load_lib gdb-python.exp
21
22set testfile "py-events"
23set srcfile ${testfile}.c
24set binfile ${objdir}/${subdir}/${testfile}
25set pyfile ${srcdir}/${subdir}/${testfile}.py
26
27if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
28 return -1
29}
30
31if { [skip_python_tests] } { continue }
32
33gdb_test_no_output "python execfile ('${pyfile}')" ""
34
35if ![runto_main ] then {
36 fail "Can't run to main"
37 return -1
38}
39
40gdb_test "Test_Events" "Event testers registered."
41
6839b47f 42gdb_breakpoint "first"
c17a9e46
HZ
43gdb_breakpoint "first"
44
45# Test continue event and breakpoint stop event
46gdb_test "continue" ".*event type: continue.*
47.*event type: stop.*
48.*stop reason: breakpoint.*
6839b47f 49.*first breakpoint number: 2.*
c17a9e46 50.*breakpoint number: 2.*
6839b47f 51.*breakpoint number: 3.*
c17a9e46
HZ
52all threads stopped"
53
54#test exited event.
55gdb_test "continue" ".*event type: continue.*
56.*event type: exit.*
57.*exit code: 12.*"
This page took 0.103845 seconds and 4 git commands to generate.