rpms/gdb/devel gdb-6.3-ia32el-fix-waitpid-20060615.patch, NONE, 1.1 gdb.spec, 1.183, 1.184

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Thu Jun 15 10:36:08 UTC 2006


Author: aoliva

Update of /cvs/dist/rpms/gdb/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv21650/devel

Modified Files:
	gdb.spec 
Added Files:
	gdb-6.3-ia32el-fix-waitpid-20060615.patch 
Log Message:
* Thu Jun 15 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.132
- Additional patch for BZ 175083, to cope with waitpid setting status
even when returning zero.


gdb-6.3-ia32el-fix-waitpid-20060615.patch:
 linux-nat.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+)

--- NEW FILE gdb-6.3-ia32el-fix-waitpid-20060615.patch ---
Index: gdb-6.3/gdb/linux-nat.c
===================================================================
--- gdb-6.3.orig/gdb/linux-nat.c	2006-06-15 07:27:02.000000000 -0300
+++ gdb-6.3/gdb/linux-nat.c	2006-06-15 07:27:06.000000000 -0300
@@ -157,12 +157,28 @@ static int
 my_waitpid (int pid, int *status, int flags)
 {
   int ret;
+  int old_status = status ? *status : 0;
+
   do
     {
       ret = waitpid (pid, status, flags);
     }
   while (ret == -1 && errno == EINTR);
 
+  if (ret == 0 && status != 0)
+    {
+      /* waitpid() running within ia32el (on multi-threaded processes
+	 only?) modifies status even when it returns zero, and this
+	 breaks the assumption in linux_nat_wait(), and perhaps
+	 elsewhere, that it remains unchanged in this case.  We
+	 restore the old value before returning zero, such that the
+	 assumption holds.  */
+      if (*status != 0 && *status != old_status)
+        warning ("waitpid: non-zero status %x for zero return value",
+                 *status);
+      *status = old_status;
+    }
+
   return ret;
 }
 


Index: gdb.spec
===================================================================
RCS file: /cvs/dist/rpms/gdb/devel/gdb.spec,v
retrieving revision 1.183
retrieving revision 1.184
diff -u -r1.183 -r1.184
--- gdb.spec	31 May 2006 07:15:55 -0000	1.183
+++ gdb.spec	15 Jun 2006 10:35:58 -0000	1.184
@@ -11,7 +11,7 @@
 Version: 6.3.0.0
 
 # The release always contains a leading reserved number, start it at 0.
-Release: 1.131.FC6
+Release: 1.132.FC6
 
 License: GPL
 Group: Development/Debuggers
@@ -281,12 +281,16 @@
 # Use bigger numbers than int.
 Patch176: gdb-6.3-large-core-20051206.patch
 
-# Do not let errors related with debug registers break thread debugging.
-Patch177: gdb-6.3-catch-debug-registers-error-20060527.patch
-
 # Hard-code executable names in gstack, such that it can run with a
 # corrupted or missing PATH.
-Patch178: gdb-6.3-gstack-without-path-20060414.patch
+Patch177: gdb-6.3-gstack-without-path-20060414.patch
+
+# Do not let errors related with debug registers break thread debugging.
+Patch178: gdb-6.3-catch-debug-registers-error-20060527.patch
+
+# Copy with waitpid modifying status even when returning zero, as on
+# ia32el.
+Patch179: gdb-6.3-ia32el-fix-waitpid-20060615.patch
 
 BuildRequires: ncurses-devel glibc-devel gcc make gzip texinfo dejagnu gettext
 
@@ -395,6 +399,7 @@
 %patch176 -p1
 %patch177 -p1
 %patch178 -p1
+%patch179 -p1
 
 # Change the version that gets printed at GDB startup, so it is RedHat
 # specific.
@@ -563,6 +568,10 @@
 # don't include the files in include, they are part of binutils
 
 %changelog
+* Thu Jun 15 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.132
+- Additional patch for BZ 175083, to cope with waitpid setting status
+even when returning zero.
+
 * Wed May 31 2006 Alexandre Oliva <aoliva at redhat.com> - 6.3.0.0-1.131
 - Require gettext at build time.  (BZ193366)
 




More information about the fedora-cvs-commits mailing list