public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Rebase to FSF GDB 17.1.
Date: Sun, 28 Jun 2026 00:02:17 GMT	[thread overview]
Message-ID: <178260493791.1.4580942144888231691.rpms-gdb-cdcbfd69f7c7@fedoraproject.org> (raw)

          A new commit has been pushed.

          Repo   : rpms/gdb
          Branch : gdb-17.2-rebase-f44
          Commit : cdcbfd69f7c739b9d192296b7ba358db2bbc80c0
          Author : Kevin Buettner <kevinb@redhat.com>
          Date   : 2026-01-08T15:43:18-07:00
          Stats  : +451/-89 in 13 file(s)
          URL    : https://src.fedoraproject.org/rpms/gdb/c/cdcbfd69f7c739b9d192296b7ba358db2bbc80c0?branch=gdb-17.2-rebase-f44

          Log:
          Rebase to FSF GDB 17.1.

Deleted: gdb-fix-bg-execution-repeat.patch
Backport 919ba8ce158e, "bfd: fix build with C23", from Guinevere Larsen,
fixing RH BZ 2424325.
Backport "Fix some more C23 const-correctness issues", from Keith Seitz,
fixing same class of problem described by RH BZ 2424325.
Backport 777079c67c81, "[gdb/build, c++20] Fix deprecated implicit
capture in cooked_index::set_contents", from Tom de Vries, fixing more
FTBS problems.

---
diff --git a/.gitignore b/.gitignore
index 801bdfc..5c18b65 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 /gdb-libstdc++-v3-python-8.1.1-20180626.tar.xz
 /v2.0.5.tar.gz
 /gdb-16.3.tar.xz
+/gdb-17.1.tar.xz

diff --git a/_gdb.spec.Patch.include b/_gdb.spec.Patch.include
index 4005134..0a55333 100644
--- a/_gdb.spec.Patch.include
+++ b/_gdb.spec.Patch.include
@@ -19,6 +19,15 @@ Patch002: gdb-add-index.patch
 # RPMs to install when GDB finds an objfile with no debug info.
 Patch003: gdb-rpm-suggestion-script.patch
 
-# Backport "Fix another timeout in gdb.base/bg-execution-repeat.exp"
-Patch004: gdb-fix-bg-execution-repeat.patch
+# Backport Guinevere Larsen's build warning fixes (RH BZ 2424325).
+Patch004: gdb-rhbz2424325-c23-const-build-warnings.patch
+
+# Backport Keith Seitz's C23 const-correctness fixes (pending upstream review).
+# Mailing list: https://sourceware.org/pipermail/binutils/2026-January/...
+# Posted 2026-01-07, not yet approved.
+Patch005: gdb-rhbz2424325-c23-more-const-fixes.patch
+
+# Backport Tom de Vries fix regarding implicit lambda captures
+# (RH BZ 2424325).
+Patch006: gdb-rhbz2424325-c++20-implicit-lambda-capture.patch
 

diff --git a/_gdb.spec.patch.include b/_gdb.spec.patch.include
index e0f5e4b..5885b36 100644
--- a/_gdb.spec.patch.include
+++ b/_gdb.spec.patch.include
@@ -2,3 +2,5 @@
 %patch -p1 -P002
 %patch -p1 -P003
 %patch -p1 -P004
+%patch -p1 -P005
+%patch -p1 -P006

diff --git a/_git_upstream_commit b/_git_upstream_commit
index 1e79418..452ca53 100644
--- a/_git_upstream_commit
+++ b/_git_upstream_commit
@@ -1 +1 @@
-140ba011c003fda0fb2f746cf2bc0f010bf4ac03
+631a49c452a4a456dd9889d172541ea789f8bcae

diff --git a/_patch_order b/_patch_order
index 8103f66..c700282 100644
--- a/_patch_order
+++ b/_patch_order
@@ -1,4 +1,6 @@
 gdb-test-show-version.patch
 gdb-add-index.patch
 gdb-rpm-suggestion-script.patch
-gdb-fix-bg-execution-repeat.patch
+gdb-rhbz2424325-c23-const-build-warnings.patch
+gdb-rhbz2424325-c23-more-const-fixes.patch
+gdb-rhbz2424325-c++20-implicit-lambda-capture.patch

diff --git a/gdb-add-index.patch b/gdb-add-index.patch
index 52a3145..69175d7 100644
--- a/gdb-add-index.patch
+++ b/gdb-add-index.patch
@@ -19,7 +19,7 @@ Subject: gdb-add-index.patch
 diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
 --- a/gdb/contrib/gdb-add-index.sh
 +++ b/gdb/contrib/gdb-add-index.sh
-@@ -16,14 +16,52 @@
+@@ -16,9 +16,8 @@
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
@@ -31,7 +31,9 @@ diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
  OBJCOPY=${OBJCOPY:=objcopy}
  READELF=${READELF:=readelf}
  
- myname="${0##*/}"
+@@ -52,6 +51,45 @@ print_version() {
+     echo "GNU gdb-add-index (${PKGVERSION}) ${VERSION}"
+ }
  
 +# For GDB itself we need to be a little smarter.  If GDB is set in the
 +# environment then we will use that.  But if GDB is not set in the
@@ -73,5 +75,5 @@ diff --git a/gdb/contrib/gdb-add-index.sh b/gdb/contrib/gdb-add-index.sh
 +fi
 +
  dwarf5=""
- if [ "$1" = "-dwarf-5" ]; then
-     dwarf5="$1"
+ 
+ # Parse options.

diff --git a/gdb-fix-bg-execution-repeat.patch b/gdb-fix-bg-execution-repeat.patch
deleted file mode 100644
index d255c25..0000000
--- a/gdb-fix-bg-execution-repeat.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova@redhat.com>
-Date: Fri, 25 Apr 2025 10:31:16 +0200
-Subject: gdb-fix-bg-execution-repeat.patch
-
-;; Backport "Fix another timeout in gdb.base/bg-execution-repeat.exp"
-
-[gdb/testsuite] Fix another timeout in gdb.base/bg-execution-repeat.exp
-
-With test-case gdb.base/bg-execution-repeat.exp, occasionally I run into a
-timeout:
-...
-(gdb) c 1&
-Will stop next time breakpoint 1 is reached.  Continuing.
-(gdb) PASS: $exp: c 1&: c 1&
-
-Breakpoint 2, foo () at bg-execution-repeat.c:23
-23        return 0; /* set break here */
-PASS: $exp: c 1&: breakpoint hit 1
-
-Will stop next time breakpoint 2 is reached.  Continuing.
-(gdb) PASS: $exp: c 1&: repeat bg command
-print 1
-$1 = 1
-(gdb) PASS: $exp: c 1&: input still accepted
-interrupt
-(gdb) PASS: $exp: c 1&: interrupt
-
-Program received signal SIGINT, Interrupt.
-foo () at bg-execution-repeat.c:24
-24      }
-PASS: $exp: c 1&: interrupt received
-set var do_wait=0
-(gdb) PASS: $exp: c 1&: set var do_wait=0
-continue&
-Continuing.
-(gdb) PASS: $exp: c 1&: continue&
-FAIL: $exp: c 1&: breakpoint hit 2 (timeout)
-...
-
-I can reproduce it reliably by adding a "sleep (1)" before the "do_wait = 1"
-in the .c file.
-
-The timeout happens as follows:
-- with the inferior stopped at main, gdb continues (command c 1&)
-- the inferior hits the breakpoint at foo
-- gdb continues (using the repeat command functionality)
-- the inferior is interrupted
-- inferior variable do_wait gets set to 0.  The assumption here is that the
-  inferior has progressed enough that do_wait is set to 1 at that point, but
-  that happens not to be the case.  Consequently, this has no effect.
-- gdb continues
-- the inferior sets do_wait to 1
-- the inferior enters the wait function, and wait for do_wait to become 0,
-  which never happens.
-
-Fix this by moving the "do_wait = 1" to before the first call to foo.
-
-Tested on x86_64-linux.
-
-Reviewed-By: Alexandra Petlanova Hajkova <ahajkova@redhat.com>
-
-diff --git a/gdb/testsuite/gdb.base/bg-execution-repeat.c b/gdb/testsuite/gdb.base/bg-execution-repeat.c
---- a/gdb/testsuite/gdb.base/bg-execution-repeat.c
-+++ b/gdb/testsuite/gdb.base/bg-execution-repeat.c
-@@ -37,9 +37,9 @@ main (void)
- {
-   alarm (60);
- 
-+  do_wait = 1;
-   foo ();
- 
--  do_wait = 1;
-   wait ();
-   /* do_wait set to 0 externally.  */
- 

diff --git a/gdb-rhbz2424325-c++20-implicit-lambda-capture.patch b/gdb-rhbz2424325-c++20-implicit-lambda-capture.patch
new file mode 100644
index 0000000..90473a1
--- /dev/null
+++ b/gdb-rhbz2424325-c++20-implicit-lambda-capture.patch
@@ -0,0 +1,27 @@
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Kevin Buettner <kevinb@redhat.com>
+Date: Wed, 7 Jan 2026 23:51:38 -0700
+Subject: gdb-rhbz2424325-c++20-implicit-lambda-capture.patch
+
+;; Backport Tom de Vries fix regarding implicit lambda captures
+;; (RH BZ 2424325).
+
+[gdb/build, c++20] Fix deprecated implicit capture in cooked_index::set_contents
+
+Fix deprecated implicit capture of this in cooked_index::set_contents, by
+removing the capture default, and explicitly listing all captures.
+
+Tested on x86_64-linux.
+
+diff --git a/gdb/dwarf2/cooked-index.c b/gdb/dwarf2/cooked-index.c
+--- a/gdb/dwarf2/cooked-index.c
++++ b/gdb/dwarf2/cooked-index.c
+@@ -102,7 +102,7 @@ cooked_index::set_contents ()
+     {
+       auto this_shard = shard.get ();
+       const parent_map_map *parent_maps = m_state->get_parent_map_map ();
+-      finalizers.add_task ([=] ()
++      finalizers.add_task ([this, this_shard, parent_maps] ()
+ 	{
+ 	  scoped_time_it time_it ("DWARF finalize worker",
+ 				  m_state->m_per_command_time);

diff --git a/gdb-rhbz2424325-c23-const-build-warnings.patch b/gdb-rhbz2424325-c23-const-build-warnings.patch
new file mode 100644
index 0000000..517ee6e
--- /dev/null
+++ b/gdb-rhbz2424325-c23-const-build-warnings.patch
@@ -0,0 +1,209 @@
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Kevin Buettner <kevinb@redhat.com>
+Date: Wed, 7 Jan 2026 22:12:42 -0700
+Subject: gdb-rhbz2424325-c23-const-build-warnings.patch
+
+;; Backport Guinevere Larsen's build warning fixes (RH BZ 2424325).
+
+bfd: fix build with C23
+
+Starting in C23, strchr and strrchr will return const char *, if fed a
+const char *.  This means that several files in the BFD directory will
+fail to build as they are assigning the return of those functions to a
+char *.
+
+Fix this by const-ifying several variables. The only place where that
+wasn't just that was in targets.c, where a variable was being used in
+subsequent strrchr invocations to change the underlying string, so a new
+variable had to be introduced.
+
+No user-visible change should happen after this commit.
+
+diff --git a/bfd/bfd.c b/bfd/bfd.c
+--- a/bfd/bfd.c
++++ b/bfd/bfd.c
+@@ -1060,7 +1060,7 @@ _bfd_doprnt (bfd_print_callback print, void *stream, const char *format,
+       if (*ptr != '%')
+ 	{
+ 	  /* While we have regular characters, print them.  */
+-	  char *end = strchr (ptr, '%');
++	  const char *end = strchr (ptr, '%');
+ 	  if (end != NULL)
+ 	    result = print (stream, "%.*s", (int) (end - ptr), ptr);
+ 	  else
+diff --git a/bfd/elflink.c b/bfd/elflink.c
+--- a/bfd/elflink.c
++++ b/bfd/elflink.c
+@@ -148,7 +148,7 @@ _bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie,
+   struct elf_link_hash_entry *h;
+ 
+   h = get_ext_sym_hash_from_cookie (cookie, r_symndx);
+-  
++
+   if (h != NULL)
+     {
+       if ((h->root.type == bfd_link_hash_defined
+@@ -588,7 +588,7 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info,
+   if (h->dynindx == -1)
+     {
+       struct elf_strtab_hash *dynstr;
+-      char *p;
++      const char *p;
+       const char *name;
+       size_t indx;
+ 
+@@ -718,7 +718,7 @@ bfd_elf_record_link_assignment (bfd *output_bfd,
+   if (h->versioned == unknown)
+     {
+       /* Set versioned if symbol version is unknown.  */
+-      char *version = strrchr (name, ELF_VER_CHR);
++      const char *version = strrchr (name, ELF_VER_CHR);
+       if (version)
+ 	{
+ 	  if (version > name && version[-1] != ELF_VER_CHR)
+@@ -1152,7 +1152,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
+   bool newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon;
+   bool newweak, oldweak, newfunc, oldfunc;
+   const struct elf_backend_data *bed;
+-  char *new_version;
++  const char *new_version;
+   bool default_sym = *matched;
+   struct elf_link_hash_table *htab;
+ 
+@@ -1224,7 +1224,7 @@ _bfd_elf_merge_symbol (bfd *abfd,
+ 	    {
+ 	      /* OLD_VERSION is the symbol version of the existing
+ 		 symbol. */
+-	      char *old_version;
++	      const char *old_version;
+ 
+ 	      if (h->versioned >= versioned)
+ 		old_version = strrchr (h->root.root.string,
+@@ -1950,7 +1950,7 @@ _bfd_elf_add_default_symbol (bfd *abfd,
+   bool collect;
+   bool dynamic;
+   bfd *override;
+-  char *p;
++  const char *p;
+   size_t len, shortlen;
+   asection *tmp_sec;
+   bool matched;
+@@ -2642,7 +2642,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data)
+   struct bfd_link_info *info;
+   const struct elf_backend_data *bed;
+   struct elf_info_failed eif;
+-  char *p;
++  const char *p;
+   bool hide;
+ 
+   sinfo = (struct elf_info_failed *) data;
+@@ -5641,7 +5641,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
+ 	      && !dynamic
+ 	      && (abfd->flags & BFD_PLUGIN) == 0)
+ 	    {
+-	      char *p = strchr (name, ELF_VER_CHR);
++	      const char *p = strchr (name, ELF_VER_CHR);
+ 	      if (p != NULL && p[1] != ELF_VER_CHR)
+ 		{
+ 		  /* Queue non-default versions so that .symver x, x@FOO
+@@ -5891,7 +5891,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info)
+       for (cnt = 0; cnt < nondeflt_vers_cnt; ++cnt)
+ 	{
+ 	  struct elf_link_hash_entry *h = nondeflt_vers[cnt], *hi;
+-	  char *shortname, *p;
++	  char *shortname;
++	  const char *p;
+ 	  size_t amt;
+ 
+ 	  p = strchr (h->root.root.string, ELF_VER_CHR);
+@@ -6171,7 +6172,8 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd,
+ 				const char *name)
+ {
+   struct bfd_link_hash_entry *h;
+-  char *p, *copy;
++  const char *p;
++  char *copy;
+   size_t len, first;
+ 
+   h = bfd_link_hash_lookup (info->hash, name, false, false, true);
+@@ -6466,7 +6468,7 @@ elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data)
+   name = h->root.root.string;
+   if (h->versioned >= versioned)
+     {
+-      char *p = strchr (name, ELF_VER_CHR);
++      const char *p = strchr (name, ELF_VER_CHR);
+       if (p != NULL)
+ 	{
+ 	  alc = (char *) bfd_malloc (p - name + 1);
+@@ -6539,7 +6541,7 @@ elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data)
+   name = h->root.root.string;
+   if (h->versioned >= versioned)
+     {
+-      char *p = strchr (name, ELF_VER_CHR);
++      const char *p = strchr (name, ELF_VER_CHR);
+       if (p != NULL)
+ 	{
+ 	  alc = (char *) bfd_malloc (p - name + 1);
+@@ -10378,8 +10380,8 @@ elf_link_output_symstrtab (void *finf,
+ 	    {
+ 	      /* Keep only one '@' for versioned symbols defined in
+ 	         shared objects.  */
+-	      char *version = strrchr (name, ELF_VER_CHR);
+-	      char *base_end = strchr (name, ELF_VER_CHR);
++	      const char *version = strrchr (name, ELF_VER_CHR);
++	      const char *base_end = strchr (name, ELF_VER_CHR);
+ 	      if (version != base_end)
+ 		{
+ 		  size_t base_len;
+@@ -11118,7 +11120,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data)
+ 	      || h->ref_dynamic
+ 	      || !h->def_regular))
+ 	{
+-	  char *p = strrchr (h->root.root.string, ELF_VER_CHR);
++	  const char *p = strrchr (h->root.root.string, ELF_VER_CHR);
+ 
+ 	  if (p && p [1] != '\0')
+ 	    {
+@@ -11670,7 +11672,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd)
+ 		     input_bfd);
+ 		  bfd_set_error (bfd_error_bad_value);
+ 		  return false;
+-		}	      
++		}
+ 
+ 	      /* Arrange for symbol to be output.  */
+ 	      h->indx = -2;
+@@ -15142,7 +15144,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie)
+       struct elf_link_hash_entry *h;
+ 
+       h = get_ext_sym_hash_from_cookie (rcookie, r_symndx);
+-      
++
+       if (h != NULL)
+ 	{
+ 	  if ((h->root.type == bfd_link_hash_defined
+diff --git a/bfd/targets.c b/bfd/targets.c
+--- a/bfd/targets.c
++++ b/bfd/targets.c
+@@ -1660,7 +1660,7 @@ bfd_get_target_info (const char *target_name, bfd *abfd,
+ 
+       if (arches && tname)
+ 	{
+-	  char *hyp = strchr (tname, '-');
++	  const char *hyp = strchr (tname, '-');
+ 
+ 	  if (hyp != NULL)
+ 	    {
+@@ -1673,9 +1673,10 @@ bfd_get_target_info (const char *target_name, bfd *abfd,
+ 		  char new_tname[50];
+ 
+ 		  strcpy (new_tname, hyp);
+-		  while ((hyp = strrchr (new_tname, '-')) != NULL)
++		  char *new_hyp;
++		  while ((new_hyp = strrchr (new_tname, '-')) != NULL)
+ 		    {
+-		      *hyp = 0;
++		      *new_hyp = 0;
+ 		      if (_bfd_find_arch_match (new_tname, arches,
+ 						def_target_arch))
+ 			break;

diff --git a/gdb-rhbz2424325-c23-more-const-fixes.patch b/gdb-rhbz2424325-c23-more-const-fixes.patch
new file mode 100644
index 0000000..6655e73
--- /dev/null
+++ b/gdb-rhbz2424325-c23-more-const-fixes.patch
@@ -0,0 +1,175 @@
+From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
+From: Keith Seitz <keiths@redhat.com>
+Date: Wed, 7 Jan 2026 09:36:28 -0800
+Subject: gdb-rhbz2424325-c23-more-const-fixes.patch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+;; Backport Keith Seitz's C23 const-correctness fixes (pending upstream review).
+;; Mailing list: https://sourceware.org/pipermail/binutils/2026-January/...
+;; Posted 2026-01-07, not yet approved.
+
+Fix some more C23 const-correctness issues
+
+Fedora Rawhide is failing to build due to new glibc header changes
+enforcing const-correctness in functions like strchr and memchr.
+For example:
+
+../../opcodes/aarch64-dis.c: In function ‘remove_dot_suffix’:
+../../opcodes/aarch64-dis.c:4027:7: error: assignment discards ‘const’ qualifier from po
+inter target type [-Werror=discarded-qualifiers]
+ 4027 |   ptr = strchr (inst->opcode->name, '.');
+      |       ^
+cc1: all warnings being treated as errors
+
+This patch addresses all the discovered issues with --enable-targets=all
+and regenerates a few cgen files along the way.
+
+diff --git a/bfd/elf32-arc.c b/bfd/elf32-arc.c
+--- a/bfd/elf32-arc.c
++++ b/bfd/elf32-arc.c
+@@ -550,7 +550,7 @@ arc_extract_features (const char *p)
+ 
+   for (i = 0; i < ARRAY_SIZE (bfd_feature_list); i++)
+     {
+-      char *t = strstr (p, bfd_feature_list[i].attr);
++      const char *t = strstr (p, bfd_feature_list[i].attr);
+       unsigned l = strlen (bfd_feature_list[i].attr);
+       if ((t != NULL)
+ 	  && (t[l] == ','
+diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c
+--- a/bfd/vms-misc.c
++++ b/bfd/vms-misc.c
+@@ -492,14 +492,14 @@ get_vms_time_string (unsigned char *tbuf)
+ }
+ 
+ /* Create module name from filename (ie, extract the basename and convert it
+-   in upper cases).  Works on both VMS and UNIX pathes.
++   in upper cases).  Works on both VMS and UNIX paths.
+    The result has to be free().  */
+ 
+ char *
+ vms_get_module_name (const char *filename, bool upcase)
+ {
+   char *fname, *fptr;
+-  const char *fout;
++  const char *fout, *p;
+ 
+   /* Strip VMS path.  */
+   fout = strrchr (filename, ']');
+@@ -511,9 +511,9 @@ vms_get_module_name (const char *filename, bool upcase)
+     fout = filename;
+ 
+   /* Strip UNIX path.  */
+-  fptr = strrchr (fout, '/');
+-  if (fptr != NULL)
+-    fout = fptr + 1;
++  p = strrchr (fout, '/');
++  if (p != NULL)
++    fout = p + 1;
+ 
+   fname = strdup (fout);
+ 
+diff --git a/cpu/ip2k.opc b/cpu/ip2k.opc
+--- a/cpu/ip2k.opc
++++ b/cpu/ip2k.opc
+@@ -94,7 +94,7 @@ parse_fr (CGEN_CPU_DESC cd,
+ {
+   const char *errmsg;
+   const char *old_strp;
+-  char *afteroffset; 
++  const char *afteroffset;
+   enum cgen_parse_operand_result result_type;
+   bfd_vma value;
+   extern CGEN_KEYWORD ip2k_cgen_opval_register_names;
+diff --git a/opcodes/aarch64-dis.c b/opcodes/aarch64-dis.c
+--- a/opcodes/aarch64-dis.c
++++ b/opcodes/aarch64-dis.c
+@@ -4061,7 +4061,7 @@ print_operands (bfd_vma pc, const aarch64_opcode *opcode,
+ static void
+ remove_dot_suffix (char *name, const aarch64_inst *inst)
+ {
+-  char *ptr;
++  const char *ptr;
+   size_t len;
+ 
+   ptr = strchr (inst->opcode->name, '.');
+diff --git a/opcodes/ia64-opc.c b/opcodes/ia64-opc.c
+--- a/opcodes/ia64-opc.c
++++ b/opcodes/ia64-opc.c
+@@ -66,7 +66,7 @@ const struct ia64_templ_desc ia64_templ_desc[16] =
+ static void
+ get_opc_prefix (const char **ptr, char *dest)
+ {
+-  char *c = strchr (*ptr, '.');
++  const char *c = strchr (*ptr, '.');
+   if (c != NULL)
+     {
+       memcpy (dest, *ptr, c - *ptr);
+diff --git a/opcodes/ip2k-asm.c b/opcodes/ip2k-asm.c
+--- a/opcodes/ip2k-asm.c
++++ b/opcodes/ip2k-asm.c
+@@ -59,7 +59,7 @@ parse_fr (CGEN_CPU_DESC cd,
+ {
+   const char *errmsg;
+   const char *old_strp;
+-  char *afteroffset;
++  const char *afteroffset;
+   enum cgen_parse_operand_result result_type;
+   bfd_vma value;
+   extern CGEN_KEYWORD ip2k_cgen_opval_register_names;
+diff --git a/opcodes/riscv-dis.c b/opcodes/riscv-dis.c
+--- a/opcodes/riscv-dis.c
++++ b/opcodes/riscv-dis.c
+@@ -110,7 +110,7 @@ parse_riscv_dis_option_without_args (const char *option,
+ /* Parse RISC-V disassembler option (possibly with arguments).  */
+ 
+ static void
+-parse_riscv_dis_option (const char *option, struct disassemble_info *info)
++parse_riscv_dis_option (char *option, struct disassemble_info *info)
+ {
+   char *equal, *value;
+ 
+@@ -1140,7 +1140,7 @@ riscv_update_map_state (int n,
+ 
+       /* ISA mapping string may be numbered, suffixed with '.n'. Do not
+ 	 consider this as part of the ISA string.  */
+-      char *suffix = strchr (name, '.');
++      const char *suffix = strchr (name, '.');
+       if (suffix)
+ 	{
+ 	  int suffix_index = (int)(suffix - name);
+diff --git a/opcodes/tilegx-opc.c b/opcodes/tilegx-opc.c
+--- a/opcodes/tilegx-opc.c
++++ b/opcodes/tilegx-opc.c
+@@ -8003,7 +8003,7 @@ tilegx_spr_compare (const void *a_ptr, const void *b_ptr)
+ const char *
+ get_tilegx_spr_name (int num)
+ {
+-  void *result;
++  const void *result;
+   struct tilegx_spr key;
+ 
+   key.number = num;
+diff --git a/opcodes/tilepro-opc.c b/opcodes/tilepro-opc.c
+--- a/opcodes/tilepro-opc.c
++++ b/opcodes/tilepro-opc.c
+@@ -10119,7 +10119,7 @@ tilepro_spr_compare (const void *a_ptr, const void *b_ptr)
+ const char *
+ get_tilepro_spr_name (int num)
+ {
+-  void *result;
++  const void *result;
+   struct tilepro_spr key;
+ 
+   key.number = num;
+@@ -10131,7 +10131,7 @@ get_tilepro_spr_name (int num)
+     return NULL;
+ 
+   {
+-    struct tilepro_spr *result_ptr = (struct tilepro_spr *) result;
++    const struct tilepro_spr *result_ptr = (const struct tilepro_spr *) result;
+ 
+     return result_ptr->name;
+   }

diff --git a/gdb-rpm-suggestion-script.patch b/gdb-rpm-suggestion-script.patch
index c7ecf91..07a68d5 100644
--- a/gdb-rpm-suggestion-script.patch
+++ b/gdb-rpm-suggestion-script.patch
@@ -33,7 +33,7 @@ diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
  * Man Pages::                   Manual pages
  * Copying::                     GNU General Public License says
                                  how you can copy and share @value{GDBN}
-@@ -50588,6 +50589,111 @@ Show the current verbosity setting.
+@@ -50988,6 +50989,111 @@ Show the current verbosity setting.
  
  @end table
  
@@ -969,7 +969,7 @@ diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
  
      # If DEBUGINFOD_URLS is set, gdb will try to download sources and
      # debug info for f.i. system libraries.  Prevent this.
-@@ -2610,6 +2611,18 @@ proc default_gdb_start { } {
+@@ -2850,6 +2851,18 @@ proc default_gdb_start { } {
  	}
      }
  

diff --git a/gdb.spec b/gdb.spec
index b412cd4..3f2bc83 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -41,11 +41,11 @@ Name: %{?scl_prefix}gdb
 # See timestamp of source gnulib installed into gnulib/ .
 %global snapgnulib 20220501
 %global tarname gdb-%{version}
-Version: 16.3
+Version: 17.1
 
 # 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: 6%{?dist}
+Release: 1%{?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 AND MIT
 # Do not provide URL for snapshots as the file lasts there only for 2 days.
@@ -936,6 +936,17 @@ fi
 # endif scl
 
 %changelog
+* Thu Jan 8 2026 Kevin Buettner <kevinb@redhat.com> - 17.1-1
+- Rebase to FSF GDB 17.1.
+  Deleted: gdb-fix-bg-execution-repeat.patch
+  Backport 919ba8ce158e, "bfd: fix build with C23", from Guinevere Larsen,
+  fixing RH BZ 2424325.
+  Backport "Fix some more C23 const-correctness issues", from Keith Seitz,
+  fixing same class of problem described by RH BZ 2424325.
+  Backport 777079c67c81, "[gdb/build, c++20] Fix deprecated implicit
+  capture in cooked_index::set_contents", from Tom de Vries, fixing more
+  FTBS problems.
+
 * Fri Sep 19 2025 Python Maint <python-maint@redhat.com>
 - Rebuilt for Python 3.14.0rc3 bytecode
 

diff --git a/sources b/sources
index a86cf9b..fd3c204 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (gdb-16.3.tar.xz) = fffd6689c3405466a179670b04720dc825e4f210a761f63dd2b33027432f8cd5d1c059c431a5ec9e165eedd1901220b5329d73c522f9a444788888c731b29e9c
+SHA512 (gdb-17.1.tar.xz) = f1a6751e439a2128fecf3eae8b57c1608a0dc7cfe79b4356a937874e5a42bb2df0aba36eb6a9452c41966908b9a59076c7cad9720f684688ab956b65080f1d7c

                 reply	other threads:[~2026-06-28  0:02 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260493791.1.4580942144888231691.rpms-gdb-cdcbfd69f7c7@fedoraproject.org \
    --to=kevinb@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox