public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jan Kratochvil <jkratoch@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] fix-dup-patch: - Fix backtraces from core files with the executable found+loaded via
Date: Thu, 23 Jul 2026 18:29:07 GMT	[thread overview]
Message-ID: <178483134727.1.3623299223498148197.rpms-gdb-536aae5e6aee@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : fix-dup-patch
            Commit : 536aae5e6aeee21b55bc4c40293c51b22c7b6abc
            Author : Jan Kratochvil <jkratoch@fedoraproject.org>
            Date   : 2009-06-22T11:19:51+00:00
            Stats  : +20/-22 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/536aae5e6aeee21b55bc4c40293c51b22c7b6abc?branch=fix-dup-patch

            Log:
            - Fix backtraces from core files with the executable found+loaded via
    build-id.
- Due to F-11 GCC no longer needlessly duplicating .eh_frame as
    .debug_frame.

---
diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch
index 6668ce4..36a5147 100644
--- a/gdb-6.6-buildid-locate.patch
+++ b/gdb-6.6-buildid-locate.patch
@@ -13,7 +13,7 @@ Index: gdb-6.8.50.20090302/gdb/corelow.c
  
  
  #ifndef O_LARGEFILE
-@@ -267,6 +271,56 @@ add_to_thread_list (bfd *abfd, asection 
+@@ -267,6 +271,50 @@ add_to_thread_list (bfd *abfd, asection 
      inferior_ptid = ptid;			 /* Yes, make it current */
  }
  
@@ -26,6 +26,7 @@ Index: gdb-6.8.50.20090302/gdb/corelow.c
 +  struct build_id *build_id;
 +  char *exec_filename, *debug_filename;
 +  char *build_id_filename;
++  struct cleanup *back_to;
 +
 +  if (exec_bfd != NULL)
 +    return;
@@ -37,32 +38,25 @@ Index: gdb-6.8.50.20090302/gdb/corelow.c
 +  if (build_id == NULL)
 +    return;
 +
++  /* SYMFILE_OBJFILE should refer to the main executable (not only to its
++     separate debug info file).  gcc44+ keeps .eh_frame only in the main
++     executable without its duplicate .debug_frame in the separate debug info
++     file - such .eh_frame would not be found if SYMFILE_OBJFILE would refer
++     directly to the separate debug info file.  */
++
 +  exec_filename = build_id_to_filename (build_id, &build_id_filename, 0);
-+  if (exec_filename != NULL)
-+    exec_file_attach (exec_filename, from_tty);
-+  else
-+    debug_print_missing (_("the main executable file"), build_id_filename);
-+  xfree (build_id_filename);
++  back_to = make_cleanup (xfree, build_id_filename);
 +
-+  /* `.note.gnu.build-id' section exists even for files without a separate
-+     debuginfo.  */
-+  debug_filename = build_id_to_filename (build_id, &build_id_filename, 1);
-+  if (debug_filename != NULL)
++  if (exec_filename != NULL)
 +    {
-+      symbol_file_add_main (debug_filename, from_tty);
-+      xfree (debug_filename);
++      make_cleanup (xfree, exec_filename);
++      exec_file_attach (exec_filename, from_tty);
++      symbol_file_add_main (exec_filename, from_tty);
 +    }
 +  else
-+    {
-+      if (exec_filename != NULL)
-+	symbol_file_add_main (exec_filename, from_tty);
-+      /* For EXEC_FILENAME NULL we were already complaining above.  */
-+      if (symfile_objfile == NULL && exec_filename != NULL)
-+	debug_print_missing (exec_filename, build_id_filename);
-+    }
-+  xfree (build_id_filename);
++    debug_print_missing (_("the main executable file"), build_id_filename);
 +
-+  xfree (exec_filename);
++  do_cleanups (back_to);
 +
 +  /* No automatic SOLIB_ADD as the libraries would get read twice.  */
 +}

diff --git a/gdb.spec b/gdb.spec
index 4df3521..96ccf37 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -15,7 +15,7 @@ Version: 6.8.50.20090302
 
 # 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: 33%{?_with_upstream:.upstream}%{?dist}
+Release: 34%{?_with_upstream:.upstream}%{?dist}
 
 License: GPLv3+
 Group: Development/Debuggers
@@ -891,6 +891,10 @@ fi
 %endif
 
 %changelog
+* Mon Jun 22 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-34
+- Fix backtraces from core files with the executable found+loaded via build-id.
+  - Due to F-11 GCC no longer needlessly duplicating .eh_frame as .debug_frame.
+
 * Tue Jun 16 2009 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.8.50.20090302-33
 - Archer update to the snapshot: 05c402a02716177c4ddd272a6e312cbd2908ed68
 - Archer backport: 05c402a02716177c4ddd272a6e312cbd2908ed68

                 reply	other threads:[~2026-07-23 18:29 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=178483134727.1.3623299223498148197.rpms-gdb-536aae5e6aee@fedoraproject.org \
    --to=jkratoch@fedoraproject.org \
    --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