rpms/gdb/devel gdb-6.8-watchpoint-cond-test.patch, NONE, 1.1 gdb-6.8-upstream.patch, 1.7, 1.8 gdb.spec, 1.306, 1.307

Jan Kratochvil jkratoch at fedoraproject.org
Tue Nov 4 05:51:23 UTC 2008


Author: jkratoch

Update of /cvs/pkgs/rpms/gdb/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv13737

Modified Files:
	gdb-6.8-upstream.patch gdb.spec 
Added Files:
	gdb-6.8-watchpoint-cond-test.patch 
Log Message:
* Tue Nov  4 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8-26
- Fix the watchpoints conditionals.


gdb-6.8-watchpoint-cond-test.patch:

--- NEW FILE gdb-6.8-watchpoint-cond-test.patch ---
For:
http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html

--- /dev/null	2008-11-04 06:31:10.599601840 +0100
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.exp	2008-11-04 06:43:29.000000000 +0100
@@ -0,0 +1,37 @@
+# Copyright 2008 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
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+set testfile watchpoint-cond
+set srcfile ${testfile}.c
+set binfile ${objdir}/${subdir}/${testfile}
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
+    untested "Couldn't compile test program"
+    return -1
+}
+
+# Get things started.
+
+gdb_exit
+gdb_start
+gdb_reinitialize_dir $srcdir/$subdir
+gdb_load ${binfile}
+
+if { [runto_main] < 0 } {
+    untested watchpoint-cond
+    return -1
+}
+
+gdb_test "watch i if i < 20" "atchpoint \[0-9\]+: i"
+gdb_test "cont" "atchpoint \[0-9\]+: i.*Old value = 20.*New value = 19.*"
--- /dev/null	2008-11-04 06:31:10.599601840 +0100
+++ gdb-6.8/gdb/testsuite/gdb.base/watchpoint-cond.c	2008-11-04 06:42:48.000000000 +0100
@@ -0,0 +1,31 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2008 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
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   Please email any bugs, comments, and/or additions to this file to:
+   bug-gdb at prep.ai.mit.edu  */
+
+int
+main (int argc, char **argv)
+{
+  int i = 0;
+  int j = 2;
+
+  for (j = 0; j < 30; j++)
+    i = 30 - j;
+
+  return 0;
+}

gdb-6.8-upstream.patch:

Index: gdb-6.8-upstream.patch
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb-6.8-upstream.patch,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gdb-6.8-upstream.patch	1 Aug 2008 06:36:43 -0000	1.7
+++ gdb-6.8-upstream.patch	4 Nov 2008 05:51:22 -0000	1.8
@@ -1678,3 +1678,41 @@
        /* Shared library handling.  */
        set_gdbarch_skip_trampoline_code (gdbarch, ppc64_skip_trampoline_code);
        set_solib_svr4_fetch_link_map_offsets
+
+
+
+http://sourceware.org/ml/gdb-patches/2008-04/msg00379.html
+http://sourceware.org/ml/gdb-cvs/2008-04/msg00104.html
+
+2008-04-17  Marc Khouzam  <marc.khouzam at ericsson.com>
+
+	* breakpoint.c (update_watchpoint): Always reparse
+	condition.
+
+===================================================================
+RCS file: /cvs/src/src/gdb/breakpoint.c,v
+retrieving revision 1.309
+retrieving revision 1.310
+diff -u -r1.309 -r1.310
+--- src/gdb/breakpoint.c	2008/04/17 22:43:17	1.309
++++ src/gdb/breakpoint.c	2008/04/18 00:41:28	1.310
+@@ -994,14 +994,13 @@
+ 	    value_free (v);
+ 	}
+ 
+-      if (reparse && b->cond_string != NULL)
++      /* We just regenerated the list of breakpoint locations.
++         The new location does not have its condition field set to anything
++         and therefore, we must always reparse the cond_string, independently
++         of the value of the reparse flag.  */
++      if (b->cond_string != NULL)
+ 	{
+ 	  char *s = b->cond_string;
+-	  if (b->loc->cond)
+-	    {
+-	      xfree (b->loc->cond);
+-	      b->loc->cond = NULL;
+-	    }
+ 	  b->loc->cond = parse_exp_1 (&s, b->exp_valid_block, 0);
+ 	}
+     }


Index: gdb.spec
===================================================================
RCS file: /cvs/pkgs/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -r1.306 -r1.307
--- gdb.spec	3 Nov 2008 03:34:39 -0000	1.306
+++ gdb.spec	4 Nov 2008 05:51:22 -0000	1.307
@@ -13,7 +13,7 @@
 
 # The release always contains a leading reserved number, start it at 1.
 # `upstream' is not a part of `name' to stay fully rpm dependencies compatible for the testing.
-Release: 25%{?_with_upstream:.upstream}%{?dist}
+Release: 26%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+
 Group: Development/Debuggers
@@ -419,6 +419,9 @@
 # Fix occasional crash on a removed watchpoint.
 Patch338: gdb-6.8-breakpoint-gone.patch
 
+# Test the watchpoints conditionals works.
+Patch343: gdb-6.8-watchpoint-cond-test.patch
+
 BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
 BuildRequires: flex bison sharutils expat-devel
 Requires: readline
@@ -621,6 +624,7 @@
 %patch336 -p1
 %patch337 -p1
 %patch338 -p1
+%patch343 -p1
 %patch124 -p1
 
 find -name "*.orig" | xargs rm -f
@@ -884,6 +888,9 @@
 %endif
 
 %changelog
+* Tue Nov  4 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8-26
+- Fix the watchpoints conditionals.
+
 * Mon Nov  3 2008 Jan Kratochvil <jan.kratochvil at redhat.com> - 6.8-25
 - Fix the variable-length-arrays support (BZ 468266, feature BZ 377541).
 - Fix the debuginfo-install suggestions for missing base packages (BZ 467901),




More information about the fedora-extras-commits mailing list