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

Side by Side Diff: gdb/testsuite/gdb.base/ena-dis-br.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.base/echo.exp ('k') | gdb/testsuite/gdb.base/enum_cond.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This testcase is part of GDB, the GNU debugger. 1 # This testcase is part of GDB, the GNU debugger.
2 2
3 # Copyright 1997-1999, 2003-2004, 2007-2012 Free Software Foundation, 3 # Copyright 1997-1999, 2003-2004, 2007-2012 Free Software Foundation,
4 # Inc. 4 # Inc.
5 5
6 # This program is free software; you can redistribute it and/or modify 6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by 7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or 8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version. 9 # (at your option) any later version.
10 # 10 #
11 # This program is distributed in the hope that it will be useful, 11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details. 14 # GNU General Public License for more details.
15 # 15 #
16 # You should have received a copy of the GNU General Public License 16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. 17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
18 18
19 if $tracelevel then {
20 strace $tracelevel
21 }
22
23 global usestubs
24
25 # 19 #
26 # test running programs 20 # test running programs
27 # 21 #
28 22
29 set testfile "break" 23 set testfile "break"
30 set srcfile ${testfile}.c 24 set srcfile ${testfile}.c
31 set srcfile1 ${testfile}1.c 25 set srcfile1 ${testfile}1.c
32 set binfile ${objdir}/${subdir}/${testfile} 26 set binfile ${objdir}/${subdir}/${testfile}
33 27
34 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debu g nowarnings}] != "" } { 28 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}0.o" object {debu g nowarnings}] != "" } {
(...skipping 10 matching lines...) Expand all
45 untested ena-dis-br.exp 39 untested ena-dis-br.exp
46 return -1 40 return -1
47 } 41 }
48 42
49 gdb_exit 43 gdb_exit
50 gdb_start 44 gdb_start
51 gdb_reinitialize_dir $srcdir/$subdir 45 gdb_reinitialize_dir $srcdir/$subdir
52 gdb_load ${binfile} 46 gdb_load ${binfile}
53 47
54 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"] 48 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
49 set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
55 set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1] 50 set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
56 set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1] 51 set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
57 set bp_location11 [gdb_get_line_number "set breakpoint 11 here"] 52 set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
58 set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1] 53 set bp_location13 [gdb_get_line_number "set breakpoint 13 here" $srcfile1]
59 set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1] 54 set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile1]
60 set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1] 55 set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile1]
61 set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1] 56 set bp_location16 [gdb_get_line_number "set breakpoint 16 here" $srcfile1]
62 set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1] 57 set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile1]
63 set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1] 58 set bp_location18 [gdb_get_line_number "set breakpoint 18 here" $srcfile1]
64 59
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 # already proven that disabled bp's don't trigger). 156 # already proven that disabled bp's don't trigger).
162 157
163 set bp [break_at "marker4" " line ($bp_location14|$bp_location13).*"] 158 set bp [break_at "marker4" " line ($bp_location14|$bp_location13).*"]
164 159
165 gdb_test_no_output "disable $bp" "disable break marker4" 160 gdb_test_no_output "disable $bp" "disable break marker4"
166 161
167 gdb_test "info break $bp" \ 162 gdb_test "info break $bp" \
168 "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*" \ 163 "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*" \
169 "info break marker4" 164 "info break marker4"
170 165
166 if ![runto_main] then {
167 fail "enable/disable break tests suppressed"
168 }
169
170 # Test enable count by stopping at a location until it is disabled
171 # and passes through.
172
173 set bp [break_at $bp_location7 "line $bp_location7"]
174
175 set bp2 [break_at marker1 " line ($bp_location15|$bp_location16)"]
176
177 gdb_test_no_output "enable count 2 $bp" "disable break with count"
178
179 gdb_test "continue" \
180 ".*factorial .*:$bp_location7.*" \
181 "continue from enable count, first time"
182
183 gdb_test "continue" \
184 ".*factorial .*:$bp_location7.*" \
185 "continue from enable count, second time"
186
187 gdb_test "continue" \
188 ".*marker1 .*:($bp_location15|$bp_location16).*" \
189 "continue through enable count, now disabled"
190
171 # Verify that we can set a breakpoint with an ignore count N, which 191 # Verify that we can set a breakpoint with an ignore count N, which
172 # should cause the next N triggers of the bp to be ignored. (This is 192 # should cause the next N triggers of the bp to be ignored. (This is
173 # a flavor of enablement/disablement, after all.) 193 # a flavor of enablement/disablement, after all.)
174 194
175 if ![runto_main] then { 195 if ![runto_main] then {
176 fail "enable/disable break tests suppressed" 196 fail "enable/disable break tests suppressed"
177 } 197 }
178 198
179 set bp [break_at "marker1" " line ($bp_location15|$bp_location16).*"] 199 set bp [break_at "marker1" " line ($bp_location15|$bp_location16).*"]
180 200
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 -re "Not stopped at any breakpoint; argument ignored.*$gdb_prompt $" { 315 -re "Not stopped at any breakpoint; argument ignored.*$gdb_prompt $" {
296 pass "$test" 316 pass "$test"
297 } 317 }
298 -re "No breakpoint number -1.*$gdb_prompt $" { 318 -re "No breakpoint number -1.*$gdb_prompt $" {
299 kfail gdb/1689 "$test" 319 kfail gdb/1689 "$test"
300 } 320 }
301 } 321 }
302 322
303 gdb_exit 323 gdb_exit
304 return 0 324 return 0
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.base/echo.exp ('k') | gdb/testsuite/gdb.base/enum_cond.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698