public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] gdb-17.2-rebase-f44: Backport "Fix gstack issues" from upstream
@ 2026-06-28  0:02 Keith Seitz
  0 siblings, 0 replies; only message in thread
From: Keith Seitz @ 2026-06-28  0:02 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : 7183fb382e526d21dbefeae701a1cc29d0990c93
            Author : Keith Seitz <keiths@redhat.com>
            Date   : 2025-03-28T08:46:07-07:00
            Stats  : +86/-1 in 5 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/7183fb382e526d21dbefeae701a1cc29d0990c93?branch=gdb-17.2-rebase-f44

            Log:
            Backport "Fix gstack issues" from upstream
(Keith Seitz, RH BZ 2354997)

---
diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index 72c2589..0c3a66e 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -50,3 +50,8 @@ Patch009: core-target-open-segfault.patch
 # drop out when we rebase on 16.3 or 17.1.
 Patch010: tui-wrefresh-issue.patch
 
+# Backport "Fix gstack issues" from upstream
+# commit 43ac3df61492b94bf13c11bd98c9f9541e92d3b0.
+# (Keith Seitz, RH BZ 2354997)
+Patch011: gdb-rhbz2354997-gstack-drop-readnever.patch
+

diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index 6295406..a409d9f 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -8,3 +8,4 @@
 %patch -p1 -P008
 %patch -p1 -P009
 %patch -p1 -P010
+%patch -p1 -P011

diff --git a/_patch_order b/_patch_order
index 5d657e8..de5cf5c 100644
--- a/_patch_order
+++ b/_patch_order
@@ -8,3 +8,4 @@ gdb-add-index.patch
 gdb-add-rpm-suggestion-script.patch
 core-target-open-segfault.patch
 tui-wrefresh-issue.patch
+gdb-rhbz2354997-gstack-drop-readnever.patch

diff --git a/gdb-rhbz2354997-gstack-drop-readnever.patch b/gdb-rhbz2354997-gstack-drop-readnever.patch
new file mode 100644
index 0000000..70b5b9e
--- /dev/null
+++ b/gdb-rhbz2354997-gstack-drop-readnever.patch
@@ -0,0 +1,74 @@
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Keith Seitz <keiths@redhat.com>
+Date: Thu, 27 Mar 2025 11:36:19 -0700
+Subject: gdb-rhbz2354997-gstack-drop-readnever.patch
+
+;; Backport "Fix gstack issues" from upstream
+;; commit 43ac3df61492b94bf13c11bd98c9f9541e92d3b0.
+;; (Keith Seitz, RH BZ 2354997)
+
+With commit fb2ded33c1e519659743047ed7817166545b6d91, I added
+Fedora's gstack script to gdb.  Some issues have arisen since
+then, and this patch addresses those issues:
+
+. As Sam James recently noted[1], PKGVERSION and VERSION
+  need to be quoted.
+. A Fedora user reported the misuse of --readnever, which
+  causes gstack to omit filename and line number information in the
+  backtrace[Red Hat BZ 2354997].
+
+[1] https://inbox.sourceware.org/gdb-patches/d19d6bc17e0a160ce27fc572079f11a587c0e168.1742424869.git.sam@gentoo.org/
+Bug: https://bugzilla.redhat.com/show_bug.cgi?id=2354997
+
+diff --git a/gdb/gstack-1.in b/gdb/gstack-1.in
+--- a/gdb/gstack-1.in
++++ b/gdb/gstack-1.in
+@@ -1,6 +1,6 @@
+ #!/usr/bin/env bash
+ 
+-# Copyright (C) 2024 Free Software Foundation, Inc.
++# Copyright (C) 2024-2025 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
+@@ -22,8 +22,8 @@
+ GDB=${GDB:-$(command -v gdb)}
+ GDBARGS=${GDBARGS:-}
+ AWK=${AWK:-}
+-PKGVERSION=@PKGVERSION@
+-VERSION=@VERSION@
++PKGVERSION="@PKGVERSION@"
++VERSION="@VERSION@"
+ 
+ # Find an appropriate awk interpreter if one was not specified
+ # via the environment.
+@@ -132,7 +132,7 @@ EOF
+ 	  )
+ 
+ # Run GDB and remove some unwanted noise.
+-"$GDB" --quiet -nx --readnever $GDBARGS <<EOF |
++"$GDB" --quiet -nx $GDBARGS <<EOF |
+ set width 0
+ set height 0
+ set pagination no
+diff --git a/gdb/testsuite/gdb.base/gstack.exp b/gdb/testsuite/gdb.base/gstack.exp
+--- a/gdb/testsuite/gdb.base/gstack.exp
++++ b/gdb/testsuite/gdb.base/gstack.exp
+@@ -1,4 +1,4 @@
+-# Copyright (C) 2024 Free Software Foundation, Inc.
++# Copyright (C) 2024-2025 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
+@@ -60,8 +60,10 @@ if { ![gdb_assert { ![expr {$res < 0 || $res == ""}] } $test] } {
+ set test "got backtrace"
+ set saw_backtrace false
+ set no_awk false
++set location_re ${srcfile}:${decimal}
++
+ gdb_test_multiple "" $test {
+-    -i "$res" -re "#0 +(0x\[0-9a-f\]+ in )?main \(\).*\r\nGSTACK-END\r\n\$" {
++    -i "$res" -re "#0 +(0x\[0-9a-f\]+ in )?main \(\).*$location_re.*\r\nGSTACK-END\r\n\$" {
+ 	set saw_backtrace true
+ 	pass $test
+ 	exp_continue

diff --git a/gdb.spec b/gdb.spec
index 5834d16..6829a41 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -45,7 +45,7 @@ Version: 16.2
 
 # 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: 2%{?dist}
+Release: 3%{?dist}
 
 License: GPL-3.0-or-later AND BSD-3-Clause AND FSFAP AND LGPL-2.1-or-later AND GPL-2.0-or-later AND LGPL-2.0-or-later AND LicenseRef-Fedora-Public-Domain AND GFDL-1.3-or-later AND LGPL-2.0-or-later WITH GCC-exception-2.0 AND GPL-3.0-or-later WITH GCC-exception-3.1 AND GPL-2.0-or-later WITH GNU-compiler-exception
 # Do not provide URL for snapshots as the file lasts there only for 2 days.
@@ -923,6 +923,10 @@ fi
 # endif scl
 
 %changelog
+* Fri Mar 28 2025 Keith Seitz <keiths@redhat.com> - 16.2-3
+- Backport "Fix gstack issues" from upstream.
+  (Keith Seitz, RH BZ 2354997)
+
 * Thu Mar 06 2025 Kevin Buettner <kevinb@redhat.com>
 - Remove gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch.
   The upstream test 'gdb.arch/amd64-prologue-skip.exp' should be

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

only message in thread, other threads:[~2026-06-28  0:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-28  0:02 [rpms/gdb] gdb-17.2-rebase-f44: Backport "Fix gstack issues" from upstream Keith Seitz

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