gdb/gdb-6.6-buildid-readnever-s...

42 lines
1.8 KiB
Diff

2008-01-22 Jan Kratochvil <jan.kratochvil@redhat.com>
Suppress messages `(no debugging symbols found)' on the commandline
option -readnever.
Index: gdb-6.8.50.20081128/gdb/symfile.c
===================================================================
--- gdb-6.8.50.20081128.orig/gdb/symfile.c 2008-12-02 23:39:09.000000000 +0100
+++ gdb-6.8.50.20081128/gdb/symfile.c 2008-12-02 23:52:23.000000000 +0100
@@ -1028,8 +1028,10 @@ symbol_file_add_with_addrs_or_offsets (b
/* If the file has its own symbol tables it has no separate debug info.
`.dynsym'/`.symtab' go to MSYMBOLS, `.debug_info' goes to SYMTABS/PSYMTABS.
- `.gnu_debuglink' may no longer be present with `.note.gnu.build-id'. */
- if (objfile->psymtabs == NULL)
+ `.gnu_debuglink' may no longer be present with `.note.gnu.build-id'.
+ READNEVER_SYMBOL_FILES implies zero PSYMTABS and it makes no sense to be
+ finding any debug files. */
+ if (objfile->psymtabs == NULL && !readnever_symbol_files)
debugfile = find_separate_debug_file (objfile);
if (debugfile)
{
@@ -1054,7 +1056,7 @@ symbol_file_add_with_addrs_or_offsets (b
}
if (!have_partial_symbols () && !have_full_symbols ()
- && print_symbol_loading)
+ && print_symbol_loading && !readnever_symbol_files)
{
wrap_here ("");
printf_unfiltered (_("(no debugging symbols found)"));
@@ -3239,7 +3241,8 @@ reread_symbols (void)
zero is OK since dbxread.c also does what it needs to do if
objfile->global_psymbols.size is 0. */
(*objfile->sf->sym_read) (objfile, 0);
- if (!have_partial_symbols () && !have_full_symbols ())
+ if (!readnever_symbol_files && !have_partial_symbols ()
+ && !have_full_symbols ())
{
wrap_here ("");
printf_unfiltered (_("(no debugging symbols found)\n"));