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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/ena-dis-br.exp
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp
index 530120dba8caf822aa5ef584f9bf175cb2216e4c..2cf3e9a17d2499e1b03176d59e2a0de1016e1dab 100644
--- a/gdb/testsuite/gdb.base/ena-dis-br.exp
+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp
@@ -16,12 +16,6 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if $tracelevel then {
- strace $tracelevel
-}
-
-global usestubs
-
#
# test running programs
#
@@ -52,6 +46,7 @@ gdb_reinitialize_dir $srcdir/$subdir
gdb_load ${binfile}
set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
+set bp_location7 [gdb_get_line_number "set breakpoint 7 here"]
set bp_location8 [gdb_get_line_number "set breakpoint 8 here" $srcfile1]
set bp_location9 [gdb_get_line_number "set breakpoint 9 here" $srcfile1]
set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
@@ -168,6 +163,31 @@ gdb_test "info break $bp" \
"\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*" \
"info break marker4"
+if ![runto_main] then {
+ fail "enable/disable break tests suppressed"
+}
+
+# Test enable count by stopping at a location until it is disabled
+# and passes through.
+
+set bp [break_at $bp_location7 "line $bp_location7"]
+
+set bp2 [break_at marker1 " line ($bp_location15|$bp_location16)"]
+
+gdb_test_no_output "enable count 2 $bp" "disable break with count"
+
+gdb_test "continue" \
+ ".*factorial .*:$bp_location7.*" \
+ "continue from enable count, first time"
+
+gdb_test "continue" \
+ ".*factorial .*:$bp_location7.*" \
+ "continue from enable count, second time"
+
+gdb_test "continue" \
+ ".*marker1 .*:($bp_location15|$bp_location16).*" \
+ "continue through enable count, now disabled"
+
# Verify that we can set a breakpoint with an ignore count N, which
# should cause the next N triggers of the bp to be ignored. (This is
# a flavor of enablement/disablement, after all.)
« 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