From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4032 invoked by alias); 12 Aug 2014 00:24:24 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 4001 invoked by uid 89); 12 Aug 2014 00:24:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-vc0-f202.google.com Received: from mail-vc0-f202.google.com (HELO mail-vc0-f202.google.com) (209.85.220.202) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 12 Aug 2014 00:24:15 +0000 Received: by mail-vc0-f202.google.com with SMTP id hq11so1177361vcb.3 for ; Mon, 11 Aug 2014 17:24:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:mime-version:content-type :content-transfer-encoding:message-id:date:to:subject:in-reply-to :references; bh=OatoBzc/kK0dp9S1NCH7lrPZWdD5u2scX9cXOrnZPpc=; b=SJVzqu/PCA4Ex6JL8Wdmeb/rKE4vVkZ8nXIqjSwYfOpFyYYyfsQ7Z3MuyTRz8PEmBQ 5I/Oh/Ha21WEJtaOCOZLz7Nv/F9cgF/rK7P59ps/rzTJTIzuUmrYuHOdINwN3FaSnAhE 1gu1xl71BgBafIbVEU2KksEWGtuIEG1Bn8SawE/KqKDwZRdvDY0bckk6YkrL3DcGq2pB tALhvgJECd95LCC6U+0HQdkQaJ3F5FkB4Hz2/PX9Xsy4EnJaj18+eIEffY3k7yo+hikb DUdy5KHGaoiUV5h+5voFXjdU2ACr6eFsDhChVFN4oQO8FqTLBipHEs4ZCj/rRPxho8JK s6qw== X-Gm-Message-State: ALoCoQk4OqhysP1Rh7ocNoONFAct8fRWqXEBrR5RFOn58S5vg3hdFERMETK9IL4gSzb8bSBJsNx0GSHcK2eIVbkGpiE4cDvVyq1od6timCJWZUsUC1IUR7kEZY1jIdSNSU56zT6DzOLS X-Received: by 10.236.122.236 with SMTP id t72mr15509644yhh.15.1407803053000; Mon, 11 Aug 2014 17:24:13 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id y50si1103205yhk.4.2014.08.11.17.24.12 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Aug 2014 17:24:12 -0700 (PDT) Received: from ruffy.mtv.corp.google.com (ruffy.mtv.corp.google.com [172.17.128.44]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 816BC31C611 for ; Mon, 11 Aug 2014 17:24:12 -0700 (PDT) From: Doug Evans MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <21481.24235.965016.979411@ruffy.mtv.corp.google.com> Date: Tue, 12 Aug 2014 00:24:00 -0000 To: gdb-patches@sourceware.org Subject: Re: [PATCH] Delete "Loaded symbols for ..." message in solib.c In-Reply-To: <21259.55250.80049.22334@ruffy.mtv.corp.google.com> References: <21259.55250.80049.22334@ruffy.mtv.corp.google.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00189.txt.bz2 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 > > > > * 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 > > * 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 * 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} } }