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

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