* [PATCH] Delete "Loaded symbols for ..." message in solib.c @ 2014-02-24 23:31 Doug Evans 2014-02-24 23:37 ` Doug Evans 0 siblings, 1 reply; 3+ messages in thread From: Doug Evans @ 2014-02-24 23:31 UTC (permalink / raw) To: gdb-patches Hi. gdb currently prints two messages when loading symbols for shared libraries. E.g., Reading symbols from /usr/lib64/libm.so.6...(no debugging symbols found)...done. Loaded symbols for /usr/lib64/libm.so.6 The second one is redundant. Regression tested on amd64-linux. 2014-02-24 Doug Evans <dje@google.com> * solib.c (solib_read_symbols): Delete "Loaded symbols for ..." message, it is redundant with "Reading symbols from ..." message. diff --git a/gdb/solib.c b/gdb/solib.c index 3350bfd..8fd4f60 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -649,11 +649,7 @@ solib_read_symbols (struct so_list *so, int flags) " library symbols for %s:\n"), so->so_name); else - { - if (from_tty || info_verbose) - printf_unfiltered (_("Loaded symbols for %s\n"), so->so_name); - so->symbols_loaded = 1; - } + so->symbols_loaded = 1; return 1; } ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Delete "Loaded symbols for ..." message in solib.c 2014-02-24 23:31 [PATCH] Delete "Loaded symbols for ..." message in solib.c Doug Evans @ 2014-02-24 23:37 ` Doug Evans 2014-08-12 0:24 ` Doug Evans 0 siblings, 1 reply; 3+ messages in thread From: Doug Evans @ 2014-02-24 23:37 UTC (permalink / raw) To: gdb-patches Doug Evans writes: > Hi. > > gdb currently prints two messages when loading symbols for shared libraries. > E.g., > > Reading symbols from /usr/lib64/libm.so.6...(no debugging symbols found)...done. > Loaded symbols for /usr/lib64/libm.so.6 > > The second one is redundant. > > Regression tested on amd64-linux. > > 2014-02-24 Doug Evans <dje@google.com> > > * solib.c (solib_read_symbols): Delete "Loaded symbols for ..." > message, it is redundant with "Reading symbols from ..." message. > > diff --git a/gdb/solib.c b/gdb/solib.c > index 3350bfd..8fd4f60 100644 > --- a/gdb/solib.c > +++ b/gdb/solib.c > @@ -649,11 +649,7 @@ solib_read_symbols (struct so_list *so, int flags) > " library symbols for %s:\n"), > so->so_name); > else > - { > - if (from_tty || info_verbose) > - printf_unfiltered (_("Loaded symbols for %s\n"), so->so_name); > - so->symbols_loaded = 1; > - } > + so->symbols_loaded = 1; > return 1; > } > Err, one more time ... I debated whether to alter this comment: /* Read in symbols for shared object SO. If SYMFILE_VERBOSE is set in FLAGS, be chatty about it. Return non-zero if any symbols were actually loaded. */ It's still correct, and provides useful information to the reader, though the actual implementation of "be chatty about it" is done later and not inside this function itself. 2014-02-24 Doug Evans <dje@google.com> * solib.c (solib_read_symbols): Delete "Loaded symbols for ..." message, it is redundant with "Reading symbols from ..." message. diff --git a/gdb/solib.c b/gdb/solib.c index 3350bfd..c9bbc0a 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -604,8 +604,6 @@ master_so_list (void) int solib_read_symbols (struct so_list *so, int flags) { - const int from_tty = flags & SYMFILE_VERBOSE; - if (so->symbols_loaded) { /* If needed, we've already warned in our caller. */ @@ -649,11 +647,7 @@ solib_read_symbols (struct so_list *so, int flags) " library symbols for %s:\n"), so->so_name); else - { - if (from_tty || info_verbose) - printf_unfiltered (_("Loaded symbols for %s\n"), so->so_name); - so->symbols_loaded = 1; - } + so->symbols_loaded = 1; return 1; } ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Delete "Loaded symbols for ..." message in solib.c 2014-02-24 23:37 ` Doug Evans @ 2014-08-12 0:24 ` Doug Evans 0 siblings, 0 replies; 3+ messages in thread From: Doug Evans @ 2014-08-12 0:24 UTC (permalink / raw) To: gdb-patches Doug Evans writes: > Doug Evans writes: > > Hi. > > > > gdb currently prints two messages when loading symbols for shared libraries. > > E.g., > > > > Reading symbols from /usr/lib64/libm.so.6...(no debugging symbols found)...done. > > Loaded symbols for /usr/lib64/libm.so.6 > > > > The second one is redundant. > > > > Regression tested on amd64-linux. > > > > 2014-02-24 Doug Evans <dje@google.com> > > > > * solib.c (solib_read_symbols): Delete "Loaded symbols for ..." > > message, it is redundant with "Reading symbols from ..." message. > > > > diff --git a/gdb/solib.c b/gdb/solib.c > > index 3350bfd..8fd4f60 100644 > > --- a/gdb/solib.c > > +++ b/gdb/solib.c > > @@ -649,11 +649,7 @@ solib_read_symbols (struct so_list *so, int flags) > > " library symbols for %s:\n"), > > so->so_name); > > else > > - { > > - if (from_tty || info_verbose) > > - printf_unfiltered (_("Loaded symbols for %s\n"), so->so_name); > > - so->symbols_loaded = 1; > > - } > > + so->symbols_loaded = 1; > > return 1; > > } > > > > Err, one more time ... > > I debated whether to alter this comment: > > /* Read in symbols for shared object SO. If SYMFILE_VERBOSE is set in FLAGS, > be chatty about it. Return non-zero if any symbols were actually > loaded. */ > > It's still correct, and provides useful information to the reader, > though the actual implementation of "be chatty about it" is done later > and not inside this function itself. > > 2014-02-24 Doug Evans <dje@google.com> > > * solib.c (solib_read_symbols): Delete "Loaded symbols for ..." > message, it is redundant with "Reading symbols from ..." message. fyi, I've committed this thusly. [I went through the record and couldn't find any objection.] 2014-08-11 Doug Evans <dje@google.com> * solib.c (solib_read_symbols): Delete "Loaded symbols for ..." message, it is redundant with "Reading symbols from ..." message. testsuite/ * gdb.base/print-symbol-loading.exp (test_load_core): Update. (test_load_shlib): Update. diff --git a/gdb/solib.c b/gdb/solib.c index 90ea454..2f64105 100644 --- a/gdb/solib.c +++ b/gdb/solib.c @@ -603,8 +603,6 @@ master_so_list (void) int solib_read_symbols (struct so_list *so, int flags) { - const int from_tty = flags & SYMFILE_VERBOSE; - if (so->symbols_loaded) { /* If needed, we've already warned in our caller. */ @@ -648,11 +646,7 @@ solib_read_symbols (struct so_list *so, int flags) " library symbols for %s:\n"), so->so_name); else - { - if (print_symbol_loading_p (from_tty, 0, 1)) - printf_unfiltered (_("Loaded symbols for %s\n"), so->so_name); - so->symbols_loaded = 1; - } + so->symbols_loaded = 1; return 1; } diff --git a/gdb/testsuite/gdb.base/print-symbol-loading.exp b/gdb/testsuite/gdb.base/print-symbol-loading.exp index a080ce1..1abfa2a 100644 --- a/gdb/testsuite/gdb.base/print-symbol-loading.exp +++ b/gdb/testsuite/gdb.base/print-symbol-loading.exp @@ -93,7 +93,7 @@ proc test_load_core { print_symbol_loading } { } "full" { gdb_test "set solib-search-path [file dirname ${binfile_lib}]" \ - "Reading symbols from.*Loaded symbols for.*" \ + "Reading symbols from.*" \ ${test_name} } } @@ -129,7 +129,7 @@ proc test_load_shlib { print_symbol_loading } { } "full" { gdb_test "sharedlibrary .*" \ - "Reading symbols from.*Loaded symbols for.*" \ + "Reading symbols from.*" \ ${test_name} } } ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-12 0:24 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-02-24 23:31 [PATCH] Delete "Loaded symbols for ..." message in solib.c Doug Evans 2014-02-24 23:37 ` Doug Evans 2014-08-12 0:24 ` Doug Evans
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox