diff --git a/gdb-6.6-buildid-locate.patch b/gdb-6.6-buildid-locate.patch index 94ab840..3c5f5bc 100644 --- a/gdb-6.6-buildid-locate.patch +++ b/gdb-6.6-buildid-locate.patch @@ -10,6 +10,9 @@ Lookup also the main executable from the rpm database. Suppress duplicite buil-id missing files warnings. +2008-01-26 Jan Kratochvil + Print the shared libraries names unconditionally. + diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/Makefile.in gdb-6.7.1-patch274/gdb/Makefile.in --- gdb-6.7.1/gdb/Makefile.in 2008-01-23 00:05:25.000000000 +0100 +++ gdb-6.7.1-patch274/gdb/Makefile.in 2008-01-23 00:00:31.000000000 +0100 @@ -56,7 +59,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/corelow.c gdb-6.7.1-pat #ifndef O_LARGEFILE -@@ -251,6 +255,57 @@ add_to_thread_list (bfd *abfd, asection +@@ -251,6 +255,56 @@ add_to_thread_list (bfd *abfd, asection inferior_ptid = pid_to_ptid (thread_id); /* Yes, make it current */ } @@ -84,8 +87,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/corelow.c gdb-6.7.1-pat + if (exec_filename != NULL) + exec_file_attach (exec_filename, from_tty); + else -+ build_id_print_missing (_("the main executable file"), build_id_filename, -+ 1); ++ build_id_print_missing (_("the main executable file"), build_id_filename); + xfree (build_id_filename); + + /* `.note.gnu.build-id' section exists even for files without a separate @@ -102,7 +104,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/corelow.c gdb-6.7.1-pat + symbol_file_add_main (exec_filename, from_tty); + /* For EXEC_FILENAME NULL we were already complaining above. */ + if (symfile_objfile == NULL && exec_filename != NULL) -+ build_id_print_missing (exec_filename, build_id_filename, 1); ++ build_id_print_missing (exec_filename, build_id_filename); + } + xfree (build_id_filename); + @@ -174,8 +176,8 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/solib-svr4.c gdb-6.7.1- + xfree (name); + } + else -+ build_id_print_missing (new->so_name, build_id_filename, -+ 1); ++ build_id_print_missing (new->so_name, ++ build_id_filename); + xfree (build_id_filename); + xfree (build_id); + } @@ -667,7 +669,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat if (retval != NULL && !build_id_verify (retval, build_id)) { -@@ -1326,9 +1723,203 @@ build_id_to_debug_filename (struct build +@@ -1326,9 +1723,199 @@ build_id_to_debug_filename (struct build retval = NULL; } @@ -800,8 +802,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat +} + +void -+build_id_print_missing (const char *binary, const char *debug, -+ int print_filename) ++build_id_print_missing (const char *binary, const char *debug) +{ + char *exec_filename = NULL; + size_t binary_len0 = strlen (binary) + 1; @@ -842,11 +843,8 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat + } + *slot = missing_debuginfos; + -+ if (print_filename) -+ fprintf_unfiltered (gdb_stdlog, _("Missing separate debuginfo for %s\n"), -+ binary); -+ else -+ fprintf_unfiltered (gdb_stdlog, _("(no separate debuginfo file found)\n")); ++ fprintf_unfiltered (gdb_stdlog, _("Missing separate debuginfo for %s\n"), ++ binary); + + fprintf_unfiltered (gdb_stdlog, _("Try: %s %s\n"), + "yum --enablerepo='*-debuginfo' install", debug); @@ -948,15 +946,13 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat xfree (canon_name); xfree (basename); xfree (dir); -@@ -1528,6 +2130,14 @@ find_separate_debug_file (struct objfile +@@ -1528,6 +2130,12 @@ find_separate_debug_file (struct objfile } } + if (build_id_filename != NULL) + { -+ /* The filename is already printed for shared libraries. */ -+ build_id_print_missing (objfile->name, build_id_filename, -+ !(objfile->flags & OBJF_SHARED)); ++ build_id_print_missing (objfile->name, build_id_filename); + xfree (build_id_filename); + } + @@ -981,7 +977,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.h gdb-6.7.1-patch274/gdb/symfile.h --- gdb-6.7.1/gdb/symfile.h 2007-09-24 23:48:05.000000000 +0200 +++ gdb-6.7.1-patch274/gdb/symfile.h 2008-01-22 23:59:10.000000000 +0100 -@@ -353,6 +353,14 @@ extern int symfile_map_offsets_to_segmen +@@ -353,6 +353,13 @@ extern int symfile_map_offsets_to_segmen struct symfile_segment_data *get_symfile_segment_data (bfd *abfd); void free_symfile_segment_data (struct symfile_segment_data *data); @@ -990,8 +986,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.h gdb-6.7.1-pat +extern struct build_id *build_id_addr_get (CORE_ADDR addr); +extern char *build_id_to_filename (struct build_id *build_id, + char **link_return, int add_debug_suffix); -+extern void build_id_print_missing (const char *binary, const char *debug, -+ int print_filename); ++extern void build_id_print_missing (const char *binary, const char *debug); + /* From dwarf2read.c */ diff --git a/gdb.spec b/gdb.spec index 240913c..6c307a1 100644 --- a/gdb.spec +++ b/gdb.spec @@ -11,7 +11,7 @@ Name: gdb Version: 6.7.1 # The release always contains a leading reserved number, start it at 1. -Release: 11%{?dist} +Release: 12%{?dist} License: GPL Group: Development/Debuggers @@ -661,6 +661,9 @@ fi # don't include the files in include, they are part of binutils %changelog +* Thu Feb 7 2008 Jan Kratochvil - 6.7.1-12 +- build-id debug messages print now the library names unconditionally. + * Thu Jan 24 2008 Jan Kratochvil - 6.7.1-11 - Improve the text UI messages for the build-id debug files locating. - Require now the rpm libraries.