From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14185 invoked by alias); 2 Jul 2009 13:26:07 -0000 Received: (qmail 14177 invoked by uid 22791); 2 Jul 2009 13:26:06 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_23,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Jul 2009 13:25:59 +0000 Received: (qmail 4445 invoked from network); 2 Jul 2009 13:25:57 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Jul 2009 13:25:57 -0000 From: Pedro Alves To: Doug Evans Subject: Re: [RFA] Fix too many "no debugging symbols found" warnings. Date: Thu, 02 Jul 2009 13:26:00 -0000 User-Agent: KMail/1.9.10 Cc: Eli Zaretskii , tromey@redhat.com, gdb-patches@sourceware.org References: <20090523232414.BED2B846C2@localhost> <200907011902.19110.pedro@codesourcery.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Message-Id: <200907021427.14634.pedro@codesourcery.com> X-IsSubscribed: yes 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 X-SW-Source: 2009-07/txt/msg00069.txt.bz2 On Wednesday 01 July 2009 20:55:33, Doug Evans wrote: > On Wed, Jul 1, 2009 at 11:02 AM, Pedro Alves wrot= e: > > On Wednesday 01 July 2009 18:52:50, Doug Evans wrote: > >> Does anyone have any other concerns with the patch? > > > > Does this mean that there will be no way anymore to say > > that you don't want symbol loading info? =A0I was assuming > > we'd still have that option. =A0:-/ > > > > I find "set print symbol-loading-warnings" a bit > > misnamed, since this isn't about *all* warnings. =A0In fact, > > it's about *no* symbols. =A0I don't really want to get > > bishedy, but, why was it that keeping the existing > > option and adding a new one wasn't good? > > > > set print symbol-loading on|off > > set print no-symbols-found-warnings on|off >=20 > First, there's a bit of history here. > I added "print symbol-loading" to be able to turn off the "no > debugging symbols found" verbosity, but it wasn't working out the way > I wanted - it was all or nothing when what I really wanted was a way > to turn off the verbosity for automatically loaded libraries (for > which there can be 100's or even >1000) and not, for example, > executables, or anything manually done from the command line (one can > think of executables as falling in this category). Okay, I saw the original patch now. Let's focus on that first. This could= be reasonable, I suppose: set print symbol-loading auto|on|off ^ ^ ^ | | | | | +- never | | | +----- always, output even when gdb auto-loads | +-------- default, output only when gdb auto-loa= ds although IIUC, GDB never behaved like that "on" setting, so maybe we can ignore that option, and think of "auto" -> "on". OTOH, the "on" above matches what "set verbose" does. Keep reading. > Secondly, it's not clear to me that users would ever want to turn off > messages for things they do from the command line. i.e. "if > (from_tty)" is a sufficient check for these particular messages and > that's what 6.8 does (well, it also tests info_verbose). I realize > scripts might cause an excess of verbosity from command-line related > symbol loading, but I don't know of any existing examples of that, so > I didn't want to keep two options if just for that. > Thirdly, symbol-loading-warnings is a compatible renaming of > symbol-loading - any distributions that have already shipped "print > symbol-loading" will see a minor change in behavior in 7.0 but nothing > will break. [I realize this isn't a strong argument to some. I don't > have a strong opinion on the option name choice, I just mention it as > it did factor into the choice.] That's ingenious, but overboard, if you ask me. An even more compatible change would be to not change the command name at all. >=20 > Fourth, gdb doesn't print symbol loading messages if (!from_tty && > !info_verbose).=20=20 Right... > Except for the "no debugging symbols found" warning,=20 > "print symbol-loading" doesn't apply unless either of those flags are > true (in current cvs). ... and isn't this the real problem here? If we're not printing the "Reading symbols from foo...done." part, then we should not print the "no debugging symbols found" message either, ever, should we? Can't we just decide to output that latter warning under the same predicate as for the former "Reading..." output? It seems clear to me that it's formatting intent was to be always output in between the "from foo.so..." and "...done." bits. "Reading symbols from /lib/librt.so.1...(no debugging symbols found)...don= e." That is, it was missing a "(from_tty || info_verbose)" check? Why do we need the new option for this specific warning at all? > Fifth, in the past I've observed pushback on unnecessary options, and > so here I was trying to "go with the flow". There's the "flow" again :-) > Put this all together and that's why the patch is the way it is. >=20 > Ultimately, I don't have a strong opinion on having both options. I > do have a strong opinion on providing an option to the user to let > them turn off the "no debugging symbols found" message (and other such > messages) from automatically loaded libraries. I think we're complicating things. If GDB is *already printing something*, like: "Reading symbols from /lib/librt.so.1... ...done." ... then it should not be a problem for anyone to see this: "Reading symbols from /lib/librt.so.1...(no debugging symbols found)...don= e." OTOH, if GDB is printing nothing, then printing a sole: "(no debugging symbols found)" out of the blue, doesn't ever seem useful to me. Is that ever really usefu= l? Wouldn't tweaking the "no debugging symbols found" predicate make everyone = happy? --=20 Pedro Alves