public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/gdb] fix-dup-patch: - Fix backtraces from core files with the executable found+loaded via
@ 2026-07-23 18:29 Jan Kratochvil
  0 siblings, 0 replies; only message in thread
From: Jan Kratochvil @ 2026-07-23 18:29 UTC (permalink / raw)
  To: git-commits

            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

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

only message in thread, other threads:[~2026-07-23 18:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-23 18:29 [rpms/gdb] fix-dup-patch: - Fix backtraces from core files with the executable found+loaded via Jan Kratochvil

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