public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: Merge gdb-rhel5-compat.patch into: gdb-6.8-attach-signalled-detach-stopped.patch
@ 2026-06-27 23:57 Jan Kratochvil
  0 siblings, 0 replies; only message in thread
From: Jan Kratochvil @ 2026-06-27 23:57 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : ccd56ac8c9312e0c87e1b4125d99851cafc89636
Author : Jan Kratochvil <jan.kratochvil@redhat.com>
Date   : 2016-01-09T15:02:21+01:00
Stats  : +22/-39 in 3 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/ccd56ac8c9312e0c87e1b4125d99851cafc89636?branch=gdb-17.2-rebase-f44

Log:
Merge gdb-rhel5-compat.patch into: gdb-6.8-attach-signalled-detach-stopped.patch

---
diff --git a/gdb-6.8-attach-signalled-detach-stopped.patch b/gdb-6.8-attach-signalled-detach-stopped.patch
index 7c2618b..b0c9adc 100644
--- a/gdb-6.8-attach-signalled-detach-stopped.patch
+++ b/gdb-6.8-attach-signalled-detach-stopped.patch
@@ -20,12 +20,26 @@ Index: gdb-7.9.50.20150531/gdb/linux-nat.c
  
        /* The process is definitely stopped.  It is in a job control
  	 stop, unless the kernel predates the TASK_STOPPED /
-@@ -1468,6 +1472,9 @@ get_pending_status (struct lwp_info *lp,
+@@ -1529,6 +1529,23 @@ get_pending_status (struct lwp_info *lp,
  			    gdb_signal_to_string (signo));
      }
  
-+  if (*status == 0 && ptid_get_pid (lp->ptid) == pid_was_stopped)
-+    *status = W_STOPCODE (SIGSTOP);
++  /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
++     many TIDs are left unstopped).  See RH Bug 496732.  */
++  if (ptid_get_pid (lp->ptid) == pid_was_stopped)
++    {
++      int err;
++
++      errno = 0;
++      err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP);
++      if (debug_linux_nat)
++	{
++	  fprintf_unfiltered (gdb_stdlog,
++			      "SC:  lwp kill %d %s\n",
++			      err,
++			      errno ? safe_strerror (errno) : "ERRNO-OK");
++	}
++    }
 +
    return 0;
  }

diff --git a/gdb-rhel5-compat.patch b/gdb-rhel5-compat.patch
deleted file mode 100644
index 645e4ae..0000000
--- a/gdb-rhel5-compat.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Index: gdb-7.7/gdb/linux-nat.c
-===================================================================
---- gdb-7.7.orig/gdb/linux-nat.c	2014-02-09 19:18:24.048554459 +0100
-+++ gdb-7.7/gdb/linux-nat.c	2014-02-09 19:19:22.210622806 +0100
-@@ -1529,8 +1529,22 @@ get_pending_status (struct lwp_info *lp,
- 			    gdb_signal_to_string (signo));
-     }
- 
--  if (*status == 0 && ptid_get_pid (lp->ptid) == pid_was_stopped)
--    *status = W_STOPCODE (SIGSTOP);
-+  /* Workaround RHEL-5 kernel which has unreliable PTRACE_DETACH, SIGSTOP (that
-+     many TIDs are left unstopped).  See RH Bug 496732.  */
-+  if (ptid_get_pid (lp->ptid) == pid_was_stopped)
-+    {
-+      int err;
-+
-+      errno = 0;
-+      err = kill_lwp (ptid_get_lwp (lp->ptid), SIGSTOP);
-+      if (debug_linux_nat)
-+	{
-+	  fprintf_unfiltered (gdb_stdlog,
-+			      "SC:  lwp kill %d %s\n",
-+			      err,
-+			      errno ? safe_strerror (errno) : "ERRNO-OK");
-+	}
-+    }
- 
-   return 0;
- }

diff --git a/gdb.spec b/gdb.spec
index 5980afa..54b423b 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -27,7 +27,7 @@ Version: 7.10.50.%{snapsrc}
 
 # 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: 39%{?dist}
+Release: 40%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and BSD and Public Domain and GFDL
 Group: Development/Debuggers
@@ -351,11 +351,8 @@ Patch330: gdb-6.8-bz436037-reg-no-longer-active.patch
 #=fedora: It was useful only after gdb-6.8-attach-signalled-detach-stopped.patch .
 Patch331: gdb-6.8-quit-never-aborts.patch
 
-# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
-#=fedora
-Patch335: gdb-rhel5-compat.patch
-
 # [RHEL5,RHEL6] Fix attaching to stopped processes.
+# [RHEL5] Workaround kernel for detaching SIGSTOPped processes (BZ 809382).
 #=fedora
 Patch337: gdb-6.8-attach-signalled-detach-stopped.patch
 
@@ -884,9 +881,7 @@ find -name "*.info*"|xargs rm -f
 
 %patch337 -p1
 %patch331 -p1
-%patch335 -p1
 %if 0%{!?rhel:1} || 0%{?rhel} > 6
-%patch335 -p1 -R
 %patch331 -p1 -R
 %patch337 -p1 -R
 %endif
@@ -1401,6 +1396,9 @@ then
 fi
 
 %changelog
+* Sat Jan  9 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-40.fc24
+- Merge gdb-rhel5-compat.patch into: gdb-6.8-attach-signalled-detach-stopped.patch
+
 * Sat Jan  9 2016 Jan Kratochvil <jan.kratochvil@redhat.com> - 7.10.50.20160106-39.fc24
 - Simplify .spec: Remove conditional revert of: gdb-readline62-ask-more-rh.patch
 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-27 23:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-27 23:57 [rpms/gdb] gdb-17.2-rebase-f44: Merge gdb-rhel5-compat.patch into: gdb-6.8-attach-signalled-detach-stopped.patch Jan Kratochvil

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox