- Rename `set debug build-id' as `set build-id-verbose', former level 1

moved to level 2, default value is now 1, use `set build-id-verbose 0'
    now to disable the missing separate debug filenames messages (BZ
    432164).
This commit is contained in:
Jan Kratochvil 2008-02-21 21:41:59 +00:00
parent 08593f1932
commit 917a6fb9db
2 changed files with 106 additions and 57 deletions

View File

@ -13,9 +13,14 @@
2008-01-26 Jan Kratochvil <jan.kratochvil@redhat.com> 2008-01-26 Jan Kratochvil <jan.kratochvil@redhat.com>
Print the shared libraries names unconditionally. 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 2008-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
--- gdb-6.7.1/gdb/Makefile.in 2008-01-23 00:05:25.000000000 +0100 Rename `debug build-id' to `build-id-verbose'.
+++ gdb-6.7.1-patch274/gdb/Makefile.in 2008-01-23 00:00:31.000000000 +0100 Provide its level 0 to disable the build-id messages.
Resolve the RH Bug 432164.
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1-unpatched/gdb/Makefile.in gdb-6.7.1-patched/gdb/Makefile.in
--- gdb-6.7.1-unpatched/gdb/Makefile.in 2008-02-21 05:01:55.000000000 +0100
+++ gdb-6.7.1-patched/gdb/Makefile.in 2008-02-21 04:58:13.000000000 +0100
@@ -387,7 +387,7 @@ INSTALLED_LIBS=-lbfd -lreadline -lopcode @@ -387,7 +387,7 @@ INSTALLED_LIBS=-lbfd -lreadline -lopcode
CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) \ CLIBS = $(SIM) $(READLINE) $(OPCODES) $(BFD) $(INTL) $(LIBIBERTY) \
$(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \ $(XM_CLIBS) $(TM_CLIBS) $(NAT_CLIBS) $(GDBTKLIBS) @LIBS@ \
@ -45,9 +50,9 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/Makefile.in gdb-6.7.1-p
symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \ symfile-mem.o: symfile-mem.c $(defs_h) $(symtab_h) $(gdbcore_h) \
$(objfiles_h) $(exceptions_h) $(gdbcmd_h) $(target_h) $(value_h) \ $(objfiles_h) $(exceptions_h) $(gdbcmd_h) $(target_h) $(value_h) \
$(symfile_h) $(observer_h) $(auxv_h) $(elf_common_h) $(symfile_h) $(observer_h) $(auxv_h) $(elf_common_h)
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/corelow.c gdb-6.7.1-patch274/gdb/corelow.c diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1-unpatched/gdb/corelow.c gdb-6.7.1-patched/gdb/corelow.c
--- gdb-6.7.1/gdb/corelow.c 2007-09-04 01:06:35.000000000 +0200 --- gdb-6.7.1-unpatched/gdb/corelow.c 2008-02-21 05:01:55.000000000 +0100
+++ gdb-6.7.1-patch274/gdb/corelow.c 2008-01-22 23:59:10.000000000 +0100 +++ gdb-6.7.1-patched/gdb/corelow.c 2008-02-21 04:58:13.000000000 +0100
@@ -44,6 +44,10 @@ @@ -44,6 +44,10 @@
#include "gdb_assert.h" #include "gdb_assert.h"
#include "exceptions.h" #include "exceptions.h"
@ -116,7 +121,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/corelow.c gdb-6.7.1-pat
/* This routine opens and sets up the core file bfd. */ /* This routine opens and sets up the core file bfd. */
static void static void
@@ -347,6 +402,15 @@ core_open (char *filename, int from_tty) @@ -347,6 +401,15 @@ core_open (char *filename, int from_tty)
ontop = !push_target (&core_ops); ontop = !push_target (&core_ops);
discard_cleanups (old_chain); discard_cleanups (old_chain);
@ -132,7 +137,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/corelow.c gdb-6.7.1-pat
/* This is done first, before anything has a chance to query the /* This is done first, before anything has a chance to query the
inferior for information such as symbols. */ inferior for information such as symbols. */
post_create_inferior (&core_ops, from_tty); post_create_inferior (&core_ops, from_tty);
@@ -678,4 +742,11 @@ _initialize_corelow (void) @@ -678,4 +741,11 @@ _initialize_corelow (void)
if (!coreops_suppress_target) if (!coreops_suppress_target)
add_target (&core_ops); add_target (&core_ops);
@ -144,9 +149,40 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/corelow.c gdb-6.7.1-pat
+ NULL, NULL, NULL, + NULL, NULL, NULL,
+ &setlist, &showlist); + &setlist, &showlist);
} }
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/solib-svr4.c gdb-6.7.1-patch274/gdb/solib-svr4.c diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1-unpatched/gdb/doc/gdb.texinfo gdb-6.7.1-patched/gdb/doc/gdb.texinfo
--- gdb-6.7.1/gdb/solib-svr4.c 2008-01-23 00:05:25.000000000 +0100 --- gdb-6.7.1-unpatched/gdb/doc/gdb.texinfo 2008-02-21 05:00:36.000000000 +0100
+++ gdb-6.7.1-patch274/gdb/solib-svr4.c 2008-01-23 00:02:42.000000000 +0100 +++ gdb-6.7.1-patched/gdb/doc/gdb.texinfo 2008-02-21 04:59:10.000000000 +0100
@@ -12074,6 +12074,27 @@ information files.
@end table
+You can also adjust the current verbosity of the @dfn{build id} locating.
+
+@table @code
+
+@kindex set build-id-verbose
+@item set build-id-verbose 0
+No additional messages are printed.
+
+@item set build-id-verbose 1
+Missing separate debug filenames are printed.
+
+@item set build-id-verbose 2
+Missing separate debug filenames are printed and also all the parsing of the
+binaries to find their @dfn{build id} content is printed.
+
+@kindex show build-id-verbose
+@item show build-id-verbose
+Show the current verbosity value for the @dfn{build id} content locating.
+
+@end table
+
@cindex @code{.gnu_debuglink} sections
@cindex debug link sections
A debug link is a special section of the executable file named
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1-unpatched/gdb/solib-svr4.c gdb-6.7.1-patched/gdb/solib-svr4.c
--- gdb-6.7.1-unpatched/gdb/solib-svr4.c 2008-02-21 05:01:55.000000000 +0100
+++ gdb-6.7.1-patched/gdb/solib-svr4.c 2008-02-21 04:58:13.000000000 +0100
@@ -960,9 +960,34 @@ svr4_current_sos (void) @@ -960,9 +960,34 @@ svr4_current_sos (void)
free_so (new); free_so (new);
else else
@ -185,9 +221,9 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/solib-svr4.c gdb-6.7.1-
if (debug_solib) if (debug_solib)
{ {
fprintf_unfiltered (gdb_stdlog, fprintf_unfiltered (gdb_stdlog,
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-patch274/gdb/symfile.c diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1-unpatched/gdb/symfile.c gdb-6.7.1-patched/gdb/symfile.c
--- gdb-6.7.1/gdb/symfile.c 2008-01-23 00:05:25.000000000 +0100 --- gdb-6.7.1-unpatched/gdb/symfile.c 2008-02-21 05:02:16.000000000 +0100
+++ gdb-6.7.1-patch274/gdb/symfile.c 2008-01-23 00:04:29.000000000 +0100 +++ gdb-6.7.1-patched/gdb/symfile.c 2008-02-21 04:59:10.000000000 +0100
@@ -53,6 +53,9 @@ @@ -53,6 +53,9 @@
#include "parser-defs.h" #include "parser-defs.h"
#include "varobj.h" #include "varobj.h"
@ -206,19 +242,22 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num); int (*deprecated_ui_load_progress_hook) (const char *section, unsigned long num);
@@ -1238,16 +1242,62 @@ symbol_file_clear (int from_tty) @@ -1262,16 +1266,65 @@ symbol_file_clear (int from_tty)
printf_unfiltered (_("No symbol file now.\n")); printf_unfiltered (_("No symbol file now.\n"));
} }
+/* Locate NT_GNU_BUILD_ID and return its matching debug filename. +/* Locate NT_GNU_BUILD_ID and return its matching debug filename.
+ FIXME: NOTE decoding should be unified with the BFD core notes decoding. */ + FIXME: NOTE decoding should be unified with the BFD core notes decoding. */
+ +
+static int build_id_debug; +#define BUILD_ID_VERBOSE_NONE 0
+#define BUILD_ID_VERBOSE_FILENAMES 1
+#define BUILD_ID_VERBOSE_BINARY_PARSE 2
+static int build_id_verbose = BUILD_ID_VERBOSE_FILENAMES;
+static void +static void
+show_build_id_debug (struct ui_file *file, int from_tty, +show_build_id_verbose (struct ui_file *file, int from_tty,
+ struct cmd_list_element *c, const char *value) + struct cmd_list_element *c, const char *value)
+{ +{
+ fprintf_filtered (file, _("Debugging of the build-id locator is %s.\n"), + fprintf_filtered (file, _("Verbosity level of the build-id locator is %s.\n"),
+ value); + value);
+} +}
+ +
@ -271,7 +310,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
{ {
struct build_id *retval; struct build_id *retval;
@@ -1263,6 +1313,348 @@ build_id_bfd_get (bfd *abfd) @@ -1287,6 +1340,348 @@ build_id_bfd_get (bfd *abfd)
return retval; return retval;
} }
@ -423,7 +462,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ err = target_read_memory (ehdr_vma, (bfd_byte *) &x_ehdr64, sizeof x_ehdr64); + err = target_read_memory (ehdr_vma, (bfd_byte *) &x_ehdr64, sizeof x_ehdr64);
+ if (err) + if (err)
+ { + {
+ if (build_id_debug) + if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE)
+ warning (_("build-id: Error reading ELF header at address 0x%lx"), + warning (_("build-id: Error reading ELF header at address 0x%lx"),
+ (unsigned long) ehdr_vma); + (unsigned long) ehdr_vma);
+ return NULL; + return NULL;
@ -440,7 +479,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ || (bfd_get_arch_size (templ) == 32 + || (bfd_get_arch_size (templ) == 32
+ && x_ehdr64.e_ident[EI_CLASS] == ELFCLASS32))) + && x_ehdr64.e_ident[EI_CLASS] == ELFCLASS32)))
+ { + {
+ if (build_id_debug) + if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE)
+ warning (_("build-id: Unrecognized ELF header at address 0x%lx"), + warning (_("build-id: Unrecognized ELF header at address 0x%lx"),
+ (unsigned long) ehdr_vma); + (unsigned long) ehdr_vma);
+ return NULL; + return NULL;
@ -452,7 +491,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ case ELFDATA2MSB: /* Big-endian */ + case ELFDATA2MSB: /* Big-endian */
+ if (! bfd_header_big_endian (templ)) + if (! bfd_header_big_endian (templ))
+ { + {
+ if (build_id_debug) + if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE)
+ warning (_("build-id: Unrecognized " + warning (_("build-id: Unrecognized "
+ "big-endian ELF header at address 0x%lx"), + "big-endian ELF header at address 0x%lx"),
+ (unsigned long) ehdr_vma); + (unsigned long) ehdr_vma);
@ -462,7 +501,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ case ELFDATA2LSB: /* Little-endian */ + case ELFDATA2LSB: /* Little-endian */
+ if (! bfd_header_little_endian (templ)) + if (! bfd_header_little_endian (templ))
+ { + {
+ if (build_id_debug) + if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE)
+ warning (_("build-id: Unrecognized " + warning (_("build-id: Unrecognized "
+ "little-endian ELF header at address 0x%lx"), + "little-endian ELF header at address 0x%lx"),
+ (unsigned long) ehdr_vma); + (unsigned long) ehdr_vma);
@ -471,7 +510,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ break; + break;
+ case ELFDATANONE: /* No data encoding specified */ + case ELFDATANONE: /* No data encoding specified */
+ default: /* Unknown data encoding specified */ + default: /* Unknown data encoding specified */
+ if (build_id_debug) + if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE)
+ warning (_("build-id: Unrecognized " + warning (_("build-id: Unrecognized "
+ "ELF header endianity at address 0x%lx"), + "ELF header endianity at address 0x%lx"),
+ (unsigned long) ehdr_vma); + (unsigned long) ehdr_vma);
@ -488,7 +527,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ : sizeof (Elf32_External_Phdr)) + : sizeof (Elf32_External_Phdr))
+ || i_ehdr.e_phnum == 0) + || i_ehdr.e_phnum == 0)
+ { + {
+ if (build_id_debug) + if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE)
+ warning (_("build-id: Invalid ELF program headers from the ELF header " + warning (_("build-id: Invalid ELF program headers from the ELF header "
+ "at address 0x%lx"), (unsigned long) ehdr_vma); + "at address 0x%lx"), (unsigned long) ehdr_vma);
+ return NULL; + return NULL;
@ -504,7 +543,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ if (err) + if (err)
+ { + {
+ free (i_phdrs); + free (i_phdrs);
+ if (build_id_debug) + if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE)
+ warning (_("build-id: Error reading " + warning (_("build-id: Error reading "
+ "ELF program headers at address 0x%lx"), + "ELF program headers at address 0x%lx"),
+ (unsigned long) (ehdr_vma + i_ehdr.e_phoff)); + (unsigned long) (ehdr_vma + i_ehdr.e_phoff));
@ -534,7 +573,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ } + }
+ } + }
+ +
+ if (build_id_debug) + if (build_id_verbose >= BUILD_ID_VERBOSE_BINARY_PARSE)
+ warning (_("build-id: Found ELF header at address 0x%lx, loadbase 0x%lx"), + warning (_("build-id: Found ELF header at address 0x%lx, loadbase 0x%lx"),
+ (unsigned long) ehdr_vma, (unsigned long) loadbase); + (unsigned long) ehdr_vma, (unsigned long) loadbase);
+ +
@ -620,7 +659,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
/* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */ /* Return if FILENAME has NT_GNU_BUILD_ID matching the CHECK value. */
static int static int
@@ -1277,7 +1669,7 @@ build_id_verify (const char *filename, s @@ -1301,7 +1696,7 @@ build_id_verify (const char *filename, s
if (abfd == NULL) if (abfd == NULL)
return 0; return 0;
@ -629,7 +668,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
if (found == NULL) if (found == NULL)
warning (_("File \"%s\" has no build-id, file skipped"), filename); warning (_("File \"%s\" has no build-id, file skipped"), filename);
@@ -1293,8 +1685,9 @@ build_id_verify (const char *filename, s @@ -1317,8 +1712,9 @@ build_id_verify (const char *filename, s
return retval; return retval;
} }
@ -641,7 +680,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
{ {
char *link, *s, *retval = NULL; char *link, *s, *retval = NULL;
gdb_byte *data = build_id->data; gdb_byte *data = build_id->data;
@@ -1302,7 +1695,9 @@ build_id_to_debug_filename (struct build @@ -1326,7 +1722,9 @@ build_id_to_debug_filename (struct build
/* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */ /* DEBUG_FILE_DIRECTORY/.build-id/ab/cdef */
link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1 link = xmalloc (strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1
@ -652,7 +691,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
s = link + sprintf (link, "%s/.build-id/", debug_file_directory); s = link + sprintf (link, "%s/.build-id/", debug_file_directory);
if (size > 0) if (size > 0)
{ {
@@ -1313,12 +1708,14 @@ build_id_to_debug_filename (struct build @@ -1337,12 +1735,14 @@ build_id_to_debug_filename (struct build
*s++ = '/'; *s++ = '/';
while (size-- > 0) while (size-- > 0)
s += sprintf (s, "%02x", (unsigned) *data++); s += sprintf (s, "%02x", (unsigned) *data++);
@ -669,7 +708,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)) if (retval != NULL && !build_id_verify (retval, build_id))
{ {
@@ -1326,9 +1723,199 @@ build_id_to_debug_filename (struct build @@ -1350,9 +1750,202 @@ build_id_to_debug_filename (struct build
retval = NULL; retval = NULL;
} }
@ -678,9 +717,9 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ else + else
+ xfree (link); + xfree (link);
+ +
+ return retval; return retval;
+} }
+
+#include <rpm/rpmmessages.h> +#include <rpm/rpmmessages.h>
+#include <rpm/rpmlib.h> +#include <rpm/rpmlib.h>
+#include <rpm/rpmts.h> +#include <rpm/rpmts.h>
@ -766,9 +805,9 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ +
+ retval = obstack_alloc (&missing_debuginfos_obstack, size); + retval = obstack_alloc (&missing_debuginfos_obstack, size);
+ memset (retval, 0, size); + memset (retval, 0, size);
return retval; + return retval;
} +}
+
+static hashval_t +static hashval_t
+missing_debuginfos_hash_func (const struct missing_debuginfos *elem) +missing_debuginfos_hash_func (const struct missing_debuginfos *elem)
+{ +{
@ -810,6 +849,9 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
+ struct missing_debuginfos *missing_debuginfos; + struct missing_debuginfos *missing_debuginfos;
+ struct missing_debuginfos **slot; + struct missing_debuginfos **slot;
+ +
+ if (build_id_verbose < BUILD_ID_VERBOSE_FILENAMES)
+ return;
+
+ if (missing_debuginfos_hash == NULL) + if (missing_debuginfos_hash == NULL)
+ { + {
+ obstack_init (&missing_debuginfos_obstack); + obstack_init (&missing_debuginfos_obstack);
@ -869,7 +911,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
static char * static char *
get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out) get_debug_link_info (struct objfile *objfile, unsigned long *crc32_out)
{ {
@@ -1423,23 +2014,27 @@ find_separate_debug_file (struct objfile @@ -1447,23 +2040,27 @@ find_separate_debug_file (struct objfile
unsigned long crc32; unsigned long crc32;
int i; int i;
struct build_id *build_id; struct build_id *build_id;
@ -902,7 +944,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
} }
basename = get_debug_link_info (objfile, &crc32); basename = get_debug_link_info (objfile, &crc32);
@@ -1447,7 +2042,10 @@ find_separate_debug_file (struct objfile @@ -1471,7 +2068,10 @@ find_separate_debug_file (struct objfile
if (basename == NULL) if (basename == NULL)
/* There's no separate debug info, hence there's no way we could /* There's no separate debug info, hence there's no way we could
load it => no warning. */ load it => no warning. */
@ -914,7 +956,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
dir = xstrdup (objfile->name); dir = xstrdup (objfile->name);
@@ -1476,6 +2074,7 @@ find_separate_debug_file (struct objfile @@ -1500,6 +2100,7 @@ find_separate_debug_file (struct objfile
if (separate_debug_file_exists (debugfile, crc32, objfile->name)) if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{ {
@ -922,7 +964,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
xfree (basename); xfree (basename);
xfree (dir); xfree (dir);
return xstrdup (debugfile); return xstrdup (debugfile);
@@ -1489,6 +2088,7 @@ find_separate_debug_file (struct objfile @@ -1513,6 +2114,7 @@ find_separate_debug_file (struct objfile
if (separate_debug_file_exists (debugfile, crc32, objfile->name)) if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{ {
@ -930,7 +972,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
xfree (basename); xfree (basename);
xfree (dir); xfree (dir);
return xstrdup (debugfile); return xstrdup (debugfile);
@@ -1502,6 +2102,7 @@ find_separate_debug_file (struct objfile @@ -1526,6 +2128,7 @@ find_separate_debug_file (struct objfile
if (separate_debug_file_exists (debugfile, crc32, objfile->name)) if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{ {
@ -938,7 +980,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
xfree (basename); xfree (basename);
xfree (dir); xfree (dir);
return xstrdup (debugfile); return xstrdup (debugfile);
@@ -1521,6 +2122,7 @@ find_separate_debug_file (struct objfile @@ -1545,6 +2148,7 @@ find_separate_debug_file (struct objfile
if (separate_debug_file_exists (debugfile, crc32, objfile->name)) if (separate_debug_file_exists (debugfile, crc32, objfile->name))
{ {
@ -946,7 +988,7 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
xfree (canon_name); xfree (canon_name);
xfree (basename); xfree (basename);
xfree (dir); xfree (dir);
@@ -1528,6 +2130,12 @@ find_separate_debug_file (struct objfile @@ -1552,6 +2156,12 @@ find_separate_debug_file (struct objfile
} }
} }
@ -959,24 +1001,26 @@ diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.c gdb-6.7.1-pat
if (canon_name) if (canon_name)
xfree (canon_name); xfree (canon_name);
@@ -4223,4 +4833,14 @@ the global debug-file directory prepende @@ -4275,4 +4885,16 @@ the global debug-file directory prepende
NULL, NULL,
show_debug_file_directory, show_debug_file_directory,
&setlist, &showlist); &setlist, &showlist);
+ +
+ add_setshow_zinteger_cmd ("build-id", no_class, &build_id_debug, _("\ + add_setshow_zinteger_cmd ("build-id-verbose", no_class, &build_id_verbose,
+Set debugging of the build-id locator."), _("\ + _("\
+Show debugging of the build-id locator."), _("\ +Set debugging level of the build-id locator."), _("\
+Enables printf debugging output."), +Show debugging level of the build-id locator."), _("\
+Level 1 (default) enables printing the missing debug filenames,\n\
+level 2 also prints the parsing of binaries to find the identificators."),
+ NULL, + NULL,
+ show_build_id_debug, + show_build_id_verbose,
+ &setdebuglist, &showdebuglist); + &setlist, &showlist);
+ +
+ observer_attach_inferior_created (missing_debuginfos_change_inferior_created); + observer_attach_inferior_created (missing_debuginfos_change_inferior_created);
} }
diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1/gdb/symfile.h gdb-6.7.1-patch274/gdb/symfile.h diff -u -X /home/jkratoch/.diffi.list -rup gdb-6.7.1-unpatched/gdb/symfile.h gdb-6.7.1-patched/gdb/symfile.h
--- gdb-6.7.1/gdb/symfile.h 2007-09-24 23:48:05.000000000 +0200 --- gdb-6.7.1-unpatched/gdb/symfile.h 2008-02-21 05:01:55.000000000 +0100
+++ gdb-6.7.1-patch274/gdb/symfile.h 2008-01-22 23:59:10.000000000 +0100 +++ gdb-6.7.1-patched/gdb/symfile.h 2008-02-21 04:58:13.000000000 +0100
@@ -353,6 +353,13 @@ 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); struct symfile_segment_data *get_symfile_segment_data (bfd *abfd);
void free_symfile_segment_data (struct symfile_segment_data *data); void free_symfile_segment_data (struct symfile_segment_data *data);

View File

@ -11,7 +11,7 @@ Name: gdb
Version: 6.7.1 Version: 6.7.1
# The release always contains a leading reserved number, start it at 1. # The release always contains a leading reserved number, start it at 1.
Release: 13%{?dist} Release: 14%{?dist}
License: GPL License: GPL
Group: Development/Debuggers Group: Development/Debuggers
@ -704,6 +704,11 @@ fi
%{_mandir}/*/gdbserver.1* %{_mandir}/*/gdbserver.1*
%changelog %changelog
* Thu Feb 21 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.7.1-14
- Rename `set debug build-id' as `set build-id-verbose', former level 1 moved
to level 2, default value is now 1, use `set build-id-verbose 0' now to
disable the missing separate debug filenames messages (BZ 432164).
* Wed Feb 20 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.7.1-13 * Wed Feb 20 2008 Jan Kratochvil <jan.kratochvil@redhat.com> - 6.7.1-13
- ia64 build fixes from Doug Chapman (BZ 428882). - ia64 build fixes from Doug Chapman (BZ 428882).
- gdbserver separated into an extra package (BZ 405791). - gdbserver separated into an extra package (BZ 405791).