]> git.pld-linux.org Git - packages/gdb.git/blob - gdb-6.8-watchpoint-conditionals-test.patch
- typo
[packages/gdb.git] / gdb-6.8-watchpoint-conditionals-test.patch
1 For:
2 http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
3 http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html
4
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
7 @@ -0,0 +1,37 @@
8 +# Copyright 2008 Free Software Foundation, Inc.
9 +
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.
14 +#
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.
19 +#
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/>.
22 +
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"
28 +    return -1
29 +}
30 +
31 +# Get things started.
32 +
33 +gdb_exit
34 +gdb_start
35 +gdb_reinitialize_dir $srcdir/$subdir
36 +gdb_load ${binfile}
37 +
38 +if { [runto_main] < 0 } {
39 +    untested watchpoint-cond
40 +    return -1
41 +}
42 +
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
47 @@ -0,0 +1,31 @@
48 +/* This testcase is part of GDB, the GNU debugger.
49 +
50 +   Copyright 2008 Free Software Foundation, Inc.
51 +
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.
56 +
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.
61 +
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/>.
64 +
65 +   Please email any bugs, comments, and/or additions to this file to:
66 +   bug-gdb@prep.ai.mit.edu  */
67 +
68 +int
69 +main (int argc, char **argv)
70 +{
71 +  static int i = 0; /* `static' to start initialized.  */
72 +  int j = 2;
73 +
74 +  for (j = 0; j < 30; j++)
75 +    i = 30 - j;
76 +
77 +  return 0;
78 +}
This page took 0.028743 seconds and 3 git commands to generate.