public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: Update gdb-6.6-buildid-locate.patch to fix RHBZ 2181221.
Date: Sun, 28 Jun 2026 00:01:03 GMT	[thread overview]
Message-ID: <178260486306.1.16483065900960437266.rpms-gdb-5b461b9481e8@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/gdb
Branch : gdb-17.2-rebase-f44
Commit : 5b461b9481e8046db99795221294f5ad74fe1073
Author : Alexandra Hájková <ahajkova@redhat.com>
Date   : 2023-03-30T16:20:10+02:00
Stats  : +24/-16 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/gdb/c/5b461b9481e8046db99795221294f5ad74fe1073?branch=gdb-17.2-rebase-f44

Log:
Update gdb-6.6-buildid-locate.patch to fix RHBZ 2181221.

---
diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch
index a3c6494..a56ceeb 100644
--- a/gdb-6.6-buildid-locate.patch
+++ b/gdb-6.6-buildid-locate.patch
@@ -561,7 +561,8 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
 -      if (separate_debug_file_debug)
 -	gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
 +      struct stat statbuf_trash;
-+
+ 
+-      return {};
 +      /* `access' automatically dereferences LINK.  */
 +      if (lstat (link.c_str (), &statbuf_trash) != 0)
 +	{
@@ -596,8 +597,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
 +	{
 +	  if (separate_debug_file_debug)
 +	    gdb_printf (gdb_stdlog, _(" no, unable to open.\n"));
- 
--      return {};
++
 +	  continue;
 +	}
 +
@@ -628,13 +628,13 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
 +      /* If none of the real files is found report as missing file
 +	 always the non-.%u-suffixed file.  */
 +      std::string link0 = orig_link;
- 
--      return {};
++
 +      /* If the symlink has target request to install the target.
 +	 BASE-debuginfo.rpm contains the symlink but BASE.rpm may be missing.
 +	 https://bugzilla.redhat.com/show_bug.cgi?id=981154  */
 +      std::string link0_resolved (link_resolve (link0.c_str (), 0));
-+
+ 
+-      return {};
 +      if (link_all.empty ())
 +	link_all = link0_resolved;
 +      else
@@ -703,7 +703,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
  	  if (debug_bfd != NULL)
  	    return debug_bfd;
  	}
-@@ -183,30 +687,655 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
+@@ -183,30 +687,660 @@ build_id_to_bfd_suffix (size_t build_id_len, const bfd_byte *build_id,
    return {};
  }
  
@@ -1313,15 +1313,20 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
 +	   already requires its own separate lines.  */
 +
 +	gdb_printf (gdb_stdlog,
-+		    _("Missing separate debuginfo for %s\n"), binary);
-+        if (debug != NULL)
-+	  gdb_printf (gdb_stdlog, _("Try: %s %s\n"),
++		    _("Missing separate debuginfo for %s.\n"), binary);
++	if (debug != NULL)
++	{
++	  if (access (debug, F_OK) == 0) {
++	    gdb_printf (gdb_stdlog, _("Try: %s %s\n"),
 +#ifdef DNF_DEBUGINFO_INSTALL
-+			      "dnf"
++			"dnf"
 +#else
-+			      "yum"
++			"yum"
 +#endif
-+			      " --enablerepo='*debug*' install", debug);
++			" --enablerepo='*debug*' install", debug);
++	  } else
++	    gdb_printf (gdb_stdlog, _("The debuginfo package for this file is probably broken.\n"));
++	}
 +      }
 +}
 +
@@ -1365,7 +1370,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
    if (build_id != NULL)
      {
        if (separate_debug_file_debug)
-@@ -214,8 +1343,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
+@@ -214,8 +1348,21 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
  		    _("\nLooking for separate debug info (build-id) for "
  		      "%s\n"), objfile_name (objfile));
  
@@ -1388,7 +1393,7 @@ diff --git a/gdb/build-id.c b/gdb/build-id.c
        /* Prevent looping on a stripped .debug file.  */
        if (abfd != NULL
  	  && filename_cmp (bfd_get_filename (abfd.get ()),
-@@ -228,3 +1370,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
+@@ -228,3 +1375,22 @@ find_separate_debug_file_by_buildid (struct objfile *objfile)
  
    return std::string ();
  }

diff --git a/gdb.spec b/gdb.spec
index f7e9735..e5fd787 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -57,7 +57,7 @@ Version: 13.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: 2%{?dist}
+Release: 3%{?dist}
 
 License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ and GPLv2+ with exceptions and GPL+ and LGPLv2+ and LGPLv3+ and BSD and Public Domain and GFDL
 # Do not provide URL for snapshots as the file lasts there only for 2 days.
@@ -1244,6 +1244,9 @@ fi
 %endif
 
 %changelog
+* Thu Mar 30 2023 Alexandra Hájková <ahajkova@redhat.com> - 12.1-3
+- Update gdb-6.6-buildid-locate.patch to fix RHBZ 2181221.
+
 * Wed Mar 29 2023 Andrew Burgess <aburgess@redhat.com>
 - Used --with-pkgversion to place the distribution name in the version
   string rather than placing the string directly into the version.in

                 reply	other threads:[~2026-06-28  0:01 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=178260486306.1.16483065900960437266.rpms-gdb-5b461b9481e8@fedoraproject.org \
    --to=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