Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Doug Evans <dje@google.com>
To: gdb-patches@sourceware.org
Subject: Re: [PATCH] Delete "Loaded symbols for ..." message in solib.c
Date: Mon, 24 Feb 2014 23:37:00 -0000	[thread overview]
Message-ID: <21259.55250.80049.22334@ruffy.mtv.corp.google.com> (raw)
In-Reply-To: <yjt28ut06qau.fsf@ruffy.mtv.corp.google.com>

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;
     }
 


  reply	other threads:[~2014-02-24 23:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-24 23:31 Doug Evans
2014-02-24 23:37 ` Doug Evans [this message]
2014-08-12  0:24   ` Doug Evans

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=21259.55250.80049.22334@ruffy.mtv.corp.google.com \
    --to=dje@google.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox