2 http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
3 http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html
5 --- /dev/null 2008-11-04 06:31:10.599601840 +0100
6 +++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.exp 2008-11-04 06:43:29.000000000 +0100
8 +# Copyright 2008 Free Software Foundation, Inc.
10 +# This program is free software; you can redistribute it and/or modify
11 +# it under the terms of the GNU General Public License as published by
12 +# the Free Software Foundation; either version 3 of the License, or
13 +# (at your option) any later version.
15 +# This program is distributed in the hope that it will be useful,
16 +# but WITHOUT ANY WARRANTY; without even the implied warranty of
17 +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 +# GNU General Public License for more details.
20 +# You should have received a copy of the GNU General Public License
21 +# along with this program. If not, see <http://www.gnu.org/licenses/>.
23 +set testfile watchpoint-cond
24 +set srcfile ${testfile}.c
25 +set binfile ${objdir}/${subdir}/${testfile}
26 +if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
27 + untested "Couldn't compile test program"
31 +# Get things started.
35 +gdb_reinitialize_dir $srcdir/$subdir
38 +if { [runto_main] < 0 } {
39 + untested watchpoint-cond
43 +gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i"
44 +gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*"
45 --- /dev/null 2008-11-04 06:31:10.599601840 +0100
46 +++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.c 2008-11-04 06:42:48.000000000 +0100
48 +/* This testcase is part of GDB, the GNU debugger.
50 + Copyright 2008 Free Software Foundation, Inc.
52 + This program is free software; you can redistribute it and/or modify
53 + it under the terms of the GNU General Public License as published by
54 + the Free Software Foundation; either version 3 of the License, or
55 + (at your option) any later version.
57 + This program is distributed in the hope that it will be useful,
58 + but WITHOUT ANY WARRANTY; without even the implied warranty of
59 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
60 + GNU General Public License for more details.
62 + You should have received a copy of the GNU General Public License
63 + along with this program. If not, see <http://www.gnu.org/licenses/>.
65 + Please email any bugs, comments, and/or additions to this file to:
66 + bug-gdb@prep.ai.mit.edu */
69 +main (int argc, char **argv)
71 + static int i = 0; /* `static' to start initialized. */
74 + for (j = 0; j < 30; j++)