Blame SOURCES/gdb-6.8-watchpoint-conditionals-test.patch

e1d87d
For:
e1d87d
http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
e1d87d
http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html
e1d87d
e1d87d
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.exp
e1d87d
===================================================================
e1d87d
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
e1d87d
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.exp	2016-02-15 23:33:49.519099759 +0100
e1d87d
@@ -0,0 +1,37 @@
e1d87d
+# Copyright 2008 Free Software Foundation, Inc.
e1d87d
+
e1d87d
+# This program is free software; you can redistribute it and/or modify
e1d87d
+# it under the terms of the GNU General Public License as published by
e1d87d
+# the Free Software Foundation; either version 3 of the License, or
e1d87d
+# (at your option) any later version.
e1d87d
+#
e1d87d
+# This program is distributed in the hope that it will be useful,
e1d87d
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
e1d87d
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e1d87d
+# GNU General Public License for more details.
e1d87d
+#
e1d87d
+# You should have received a copy of the GNU General Public License
e1d87d
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
e1d87d
+
e1d87d
+set testfile watchpoint-cond
e1d87d
+set srcfile ${testfile}.c
e1d87d
+set binfile [standard_output_file ${testfile}]
e1d87d
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
e1d87d
+    untested "Couldn't compile test program"
e1d87d
+    return -1
e1d87d
+}
e1d87d
+
e1d87d
+# Get things started.
e1d87d
+
e1d87d
+gdb_exit
e1d87d
+gdb_start
e1d87d
+gdb_reinitialize_dir $srcdir/$subdir
e1d87d
+gdb_load ${binfile}
e1d87d
+
e1d87d
+if { [runto_main] < 0 } {
e1d87d
+    untested watchpoint-cond
e1d87d
+    return -1
e1d87d
+}
e1d87d
+
e1d87d
+gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i"
e1d87d
+gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*"
e1d87d
Index: gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.c
e1d87d
===================================================================
e1d87d
--- /dev/null	1970-01-01 00:00:00.000000000 +0000
e1d87d
+++ gdb-7.10.90.20160211/gdb/testsuite/gdb.base/watchpoint-cond.c	2016-02-15 23:32:51.974691188 +0100
e1d87d
@@ -0,0 +1,31 @@
e1d87d
+/* This testcase is part of GDB, the GNU debugger.
e1d87d
+
e1d87d
+   Copyright 2008 Free Software Foundation, Inc.
e1d87d
+
e1d87d
+   This program is free software; you can redistribute it and/or modify
e1d87d
+   it under the terms of the GNU General Public License as published by
e1d87d
+   the Free Software Foundation; either version 3 of the License, or
e1d87d
+   (at your option) any later version.
e1d87d
+
e1d87d
+   This program is distributed in the hope that it will be useful,
e1d87d
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
e1d87d
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
e1d87d
+   GNU General Public License for more details.
e1d87d
+
e1d87d
+   You should have received a copy of the GNU General Public License
e1d87d
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
e1d87d
+
e1d87d
+   Please email any bugs, comments, and/or additions to this file to:
e1d87d
+   bug-gdb@prep.ai.mit.edu  */
e1d87d
+
e1d87d
+int
e1d87d
+main (int argc, char **argv)
e1d87d
+{
e1d87d
+  static int i = 0; /* `static' to start initialized.  */
e1d87d
+  int j = 2;
e1d87d
+
e1d87d
+  for (j = 0; j < 30; j++)
e1d87d
+    i = 30 - j;
e1d87d
+
e1d87d
+  return 0;
e1d87d
+}