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

Unified Diff: gdb/testsuite/gdb.base/recpar.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/recpar.c ('k') | gdb/testsuite/gdb.base/recurse.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.base/recpar.exp
diff --git a/gdb/testsuite/gdb.base/watchpoint-delete.exp b/gdb/testsuite/gdb.base/recpar.exp
similarity index 57%
copy from gdb/testsuite/gdb.base/watchpoint-delete.exp
copy to gdb/testsuite/gdb.base/recpar.exp
index 0c5deaad7a08969946d2dd44d57c660bc8b45def..6dd466bb4e80aeb1363bedab93491927bfad1bfd 100644
--- a/gdb/testsuite/gdb.base/watchpoint-delete.exp
+++ b/gdb/testsuite/gdb.base/recpar.exp
@@ -1,5 +1,5 @@
-# Copyright 2010-2012 Free Software Foundation, Inc.
-
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
@@ -13,26 +13,30 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set testfile "watchpoint-delete"
+set testfile recpar
set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
- untested ${testfile}.exp
return -1
}
-# It is more compatible this way.
-gdb_test_no_output "set can-use-hw-watchpoints 0"
-
if ![runto_main] {
+ untested ${testfile}.exp
return -1
}
-# Ensure there is a parent frame to create related bp_watchpoint_scope.
-gdb_breakpoint [gdb_get_line_number "break-here"]
-gdb_continue_to_breakpoint "break-here" ".* break-here .*"
+gdb_test "break $srcfile:[gdb_get_line_number BREAK $srcfile] if n == 3" \
+ "Breakpoint $decimal at $hex: file .*recpar\\.c, line $decimal\\."
+
+gdb_test "continue" \
+ "Breakpoint .* foo \\(n=3\\) at .*$srcfile:$decimal.*"
+
+gdb_test "backtrace" \
+ "#0 +foo \\(n=3\\).*\r\n#1.* foo \\(n=4\\).*\r\n#2.* foo \\(n=5\\).*#3.* main \\(\\).*"
-gdb_test "watch x" {Watchpoint [0-9]+: x}
+gdb_test "frame 2" \
+ "#2 .* foo \\(n=5\\) .*"
-gdb_test_no_output {delete $bpnum}
+# In the currently selected frame, n=5, and thus foo::val should be 5
+# as well.
+gdb_test "print foo::val" \
+ " = 5"
« no previous file with comments | « gdb/testsuite/gdb.base/recpar.c ('k') | gdb/testsuite/gdb.base/recurse.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698