1 # Copyright (C) 2010, 2011 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/>.
20 load_lib gdb-python.exp
22 set testfile "py-events"
23 set srcfile ${testfile}.c
24 set binfile ${objdir}/${subdir}/${testfile}
25 set pyfile ${srcdir}/${subdir}/${testfile}.py
27 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
31 if { [skip_python_tests] } { continue }
33 gdb_test_no_output "python execfile ('${pyfile}')" ""
35 if ![runto_main ] then {
36 fail "Can't run to main"
40 gdb_test "Test_Events" "Event testers registered."
42 gdb_breakpoint "first"
43 gdb_breakpoint "first"
45 # Test continue event and breakpoint stop event
46 gdb_test "continue" ".*event type: continue.*
48 .*stop reason: breakpoint.*
49 .*first breakpoint number: 2.*
50 .*breakpoint number: 2.*
51 .*breakpoint number: 3.*
55 gdb_test "continue" ".*event type: continue.*