Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(147)

Side by Side Diff: gdb/testsuite/gdb.python/py-events.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.python/py-events.c ('k') | gdb/testsuite/gdb.python/py-events.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2010-2012 Free Software Foundation, Inc. 1 # Copyright (C) 2010-2012 Free Software Foundation, Inc.
2 2
3 # This program is free software; you can redistribute it and/or modify 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 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 5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version. 6 # (at your option) any later version.
7 # 7 #
8 # This program is distributed in the hope that it will be useful, 8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details. 11 # GNU General Public License for more details.
12 # 12 #
13 # You should have received a copy of the GNU General Public License 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/>. 14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15 15
16 if [target_info exists use_gdb_stub] { 16 if [target_info exists use_gdb_stub] {
17 return 0 17 return 0
18 } 18 }
19 19
20 if $tracelevel then {
21 strace $tracelevel
22 }
23
24 load_lib gdb-python.exp 20 load_lib gdb-python.exp
25 21
26 set libfile "py-events-shlib" 22 set libfile "py-events-shlib"
27 set libsrc $srcdir/$subdir/$libfile.c 23 set libsrc $srcdir/$subdir/$libfile.c
28 set lib_sl $objdir/$subdir/$libfile.so 24 set lib_sl [standard_output_file $libfile.so]
29 set lib_opts debug 25 set lib_opts debug
30 26
31 set testfile "py-events" 27 standard_testfile
32 set srcfile ${testfile}.c
33 set binfile ${objdir}/${subdir}/${testfile}
34 set exec_opts [list debug shlib=$lib_sl] 28 set exec_opts [list debug shlib=$lib_sl]
35 set pyfile ${srcdir}/${subdir}/${testfile}.py 29 set pyfile ${srcdir}/${subdir}/${testfile}.py
36 30
37 if [get_compiler_info ${binfile}] { 31 if [get_compiler_info] {
38 return -1 32 return -1
39 } 33 }
40 34
41 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != "" 35 if { [gdb_compile_shlib $libsrc $lib_sl $lib_opts] != ""
42 || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} { 36 || [gdb_compile $srcdir/$subdir/$srcfile $binfile executable $exec_opts] != ""} {
43 untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile." 37 untested "Could not compile either $libsrc or $srcdir/$subdir/$srcfile."
44 return -1 38 return -1
45 } 39 }
46 40
47 # Start with a fresh gdb. 41 # Start with a fresh gdb.
(...skipping 18 matching lines...) Expand all
66 60
67 # Test continue event and breakpoint stop event 61 # Test continue event and breakpoint stop event
68 gdb_test "continue" ".*event type: continue.* 62 gdb_test "continue" ".*event type: continue.*
69 .*event type: stop.* 63 .*event type: stop.*
70 .*stop reason: breakpoint.* 64 .*stop reason: breakpoint.*
71 .*first breakpoint number: 2.* 65 .*first breakpoint number: 2.*
72 .*breakpoint number: 2.* 66 .*breakpoint number: 2.*
73 .*breakpoint number: 3.* 67 .*breakpoint number: 3.*
74 all threads stopped" 68 all threads stopped"
75 69
70 # Test that when "step N" trips on a breakpoint, we get a stop event
71 # with breakpoint stop reason.
72 gdb_breakpoint "do_nothing"
73 gdb_test "step 3" ".*event type: continue.*
74 .*event type: stop.*
75 .*stop reason: breakpoint.*
76 .*first breakpoint number: 4.*
77 .*breakpoint number: 4.*
78 all threads stopped"
79
80 delete_breakpoints
81
76 #test exited event. 82 #test exited event.
77 gdb_test "continue" ".*event type: continue.* 83 gdb_test "continue" ".*event type: continue.*
78 .*event type: exit.* 84 .*event type: exit.*
79 .*exit code: 12.* 85 .*exit code: 12.*
80 .*exit inf: 1.*" "Inferior 1 terminated." 86 .*exit inf: 1.*
87 dir ok: True.*" "Inferior 1 terminated."
81 88
82 gdb_test "inferior 2" ".*Switching to inferior 2.*" 89 gdb_test "inferior 2" ".*Switching to inferior 2.*"
83 gdb_test "continue" ".*event type: continue.* 90 gdb_test "continue" ".*event type: continue.*
84 .*event type: exit.* 91 .*event type: exit.*
85 .*exit code: 12.* 92 .*exit code: 12.*
86 .*exit inf: 2.*" "Inferior 2 terminated." 93 .*exit inf: 2.*
94 dir ok: True.*" "Inferior 2 terminated."
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.python/py-events.c ('k') | gdb/testsuite/gdb.python/py-events.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698