diff options
author | Doug Evans <dje@google.com> | 2008-07-10 23:08:21 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 2008-07-10 23:08:21 +0000 |
commit | bf250677afabbf59fee4ab3e1a96ffa7ddff2146 (patch) | |
tree | e6b0011aeaa1b0eca2e3bd6704cb55eaf1911526 /gdb/symfile.c | |
parent | ef9beddf72634055b25a631850464a701599585c (diff) | |
download | gdb-bf250677afabbf59fee4ab3e1a96ffa7ddff2146.zip gdb-bf250677afabbf59fee4ab3e1a96ffa7ddff2146.tar.gz gdb-bf250677afabbf59fee4ab3e1a96ffa7ddff2146.tar.bz2 |
Add "set print symbol-loading on|off".
* NEWS: Document new option.
* symfile.h (print_symbol_loading): Declare.
* symfile.c (print_symbol_loading): New global.
(symbol_file_add_with_addrs_or_offsets): Only print "Reading symbols
from ..." if print_symbol_loading.
(_initialize_symfile): Add set/show print symbol-loading.
* solib.c (solib_read_symbols): Only print "Loaded symbols for ..."
if print_symbol_loading.
* doc/gdb.texinfo: Document "set print symbol-loading on|off".
Diffstat (limited to 'gdb/symfile.c')
-rw-r--r-- | gdb/symfile.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/gdb/symfile.c b/gdb/symfile.c index d98f62b..12f17ac 100644 --- a/gdb/symfile.c +++ b/gdb/symfile.c @@ -171,6 +171,12 @@ Dynamic symbol table reloading multiple times in one run is %s.\n"), value); } +/* If non-zero, gdb will notify the user when it is loading symbols + from a file. This is almost always what users will want to have happen; + but for programs with lots of dynamically linked libraries, the output + can be more noise than signal. */ + +int print_symbol_loading = 1; /* If non-zero, shared library symbols will be added automatically when the inferior is created, new libraries are loaded, or when @@ -1046,9 +1052,12 @@ symbol_file_add_with_addrs_or_offsets (bfd *abfd, int from_tty, deprecated_pre_add_symbol_hook (name); else { - printf_unfiltered (_("Reading symbols from %s..."), name); - wrap_here (""); - gdb_flush (gdb_stdout); + if (print_symbol_loading) + { + printf_unfiltered (_("Reading symbols from %s..."), name); + wrap_here (""); + gdb_flush (gdb_stdout); + } } } syms_from_objfile (objfile, addrs, offsets, num_offsets, @@ -1061,7 +1070,7 @@ symbol_file_add_with_addrs_or_offsets (bfd *abfd, int from_tty, if ((flags & OBJF_READNOW) || readnow_symbol_files) { - if (from_tty || info_verbose) + if ((from_tty || info_verbose) && print_symbol_loading) { printf_unfiltered (_("expanding to full symbols...")); wrap_here (""); @@ -1103,7 +1112,8 @@ symbol_file_add_with_addrs_or_offsets (bfd *abfd, int from_tty, xfree (debugfile); } - if (!have_partial_symbols () && !have_full_symbols ()) + if (!have_partial_symbols () && !have_full_symbols () + && print_symbol_loading) { wrap_here (""); printf_filtered (_("(no debugging symbols found)")); @@ -1120,7 +1130,8 @@ symbol_file_add_with_addrs_or_offsets (bfd *abfd, int from_tty, deprecated_post_add_symbol_hook (); else { - printf_unfiltered (_("done.\n")); + if (print_symbol_loading) + printf_unfiltered (_("done.\n")); } } @@ -4219,4 +4230,12 @@ the global debug-file directory prepended."), NULL, show_debug_file_directory, &setlist, &showlist); + + add_setshow_boolean_cmd ("symbol-loading", no_class, + &print_symbol_loading, _("\ +Set printing of symbol loading messages."), _("\ +Show printing of symbol loading messages."), NULL, + NULL, + NULL, + &setprintlist, &showprintlist); } |