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

Unified Diff: gdb/testsuite/gdb.mi/mi-watch-nonstop.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.mi/mi-watch.exp ('k') | gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
diff --git a/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
similarity index 59%
copy from gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp
copy to gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
index c5cf8cf968552e3ee6189ca1cf69070fa90172ab..c61b519ec9f878f4d1ed04b29cc20e0434942df0 100644
--- a/gdb/testsuite/gdb.mi/mi-ns-stale-regcache.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
@@ -1,4 +1,4 @@
-# Copyright 2002-2005, 2007-2012 Free Software Foundation, Inc.
+# Copyright 2011-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
@@ -13,8 +13,9 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Regression test for PR11557. Make sure we don't end up with a stale
-# register cache just after resuming a thread.
+if [target_info exists gdb,no_hardware_watchpoints] {
+ return -1
+}
if { ![support_displaced_stepping] } {
unsupported "displaced stepping"
@@ -41,13 +42,9 @@ proc mi_nonstop_resume { command test } {
#
# Start here
#
-set testfile "ns-stale-regcache"
-set srcfile "$testfile.c"
-set binfile "$objdir/$subdir/mi-$testfile"
+standard_testfile watch-nonstop.c
-set options [list debug incdir=$objdir]
-if {[gdb_compile "$srcdir/$subdir/$srcfile" \
- $binfile executable $options] != "" } {
+if {[gdb_compile "$srcdir/$subdir/$srcfile" $binfile executable {debug}] != "" } {
return -1
}
@@ -62,18 +59,17 @@ if { [mi_run_to_main] < 0 } {
continue
}
-# Check that register and stack info don't end up stale after resuming
-# a thread.
-mi_nonstop_resume "exec-continue" "resume thread"
-
-mi_gdb_test "-data-evaluate-expression \$pc" \
- "\\^error,msg=\".*\"" "no stale register cache of resumed thread"
-
-mi_gdb_test "-stack-info-frame" \
- "\\^error,msg=\".*\"" "no stale frame info of resumed thread"
+# Set a watchpoint.
+mi_gdb_test "111-break-watch global" \
+ "111\\^done,wpt=\{number=\"2\",exp=\"global\"\}" \
+ "break-watch operation"
-# Check that the thread is still running. If the above tests passed,
-# we want it to be for the right reasons.
-mi_check_thread_states {"running"} "main thread still running"
+# Set the target running.
+mi_nonstop_resume "exec-continue" "resume 1"
-mi_gdb_exit
+# Now try deleting the watchpoint. This would fail with "Couldn't
+# write debug register: No such process." on GNU/Linux, because we'd
+# try to poke at the debug registers of a running thread.
+mi_gdb_test "777-break-delete 2" \
+ "777\\^done" \
+ "delete watchpoint"
« no previous file with comments | « gdb/testsuite/gdb.mi/mi-watch.exp ('k') | gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698