From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7034 invoked by alias); 2 Jul 2009 20:08:39 -0000 Received: (qmail 7026 invoked by uid 22791); 2 Jul 2009 20:08:38 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 02 Jul 2009 20:08:31 +0000 Received: from spaceape13.eur.corp.google.com (spaceape13.eur.corp.google.com [172.28.16.147]) by smtp-out.google.com with ESMTP id n62K8R3m019270 for ; Thu, 2 Jul 2009 21:08:27 +0100 Received: from gxk8 (gxk8.prod.google.com [10.202.11.8]) by spaceape13.eur.corp.google.com with ESMTP id n62K8NaG027737 for ; Thu, 2 Jul 2009 13:08:24 -0700 Received: by gxk8 with SMTP id 8so1939276gxk.1 for ; Thu, 02 Jul 2009 13:08:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.90.86.10 with SMTP id j10mr346936agb.6.1246565302766; Thu, 02 Jul 2009 13:08:22 -0700 (PDT) In-Reply-To: <200907021427.14634.pedro@codesourcery.com> References: <20090523232414.BED2B846C2@localhost> <200907011902.19110.pedro@codesourcery.com> <200907021427.14634.pedro@codesourcery.com> Date: Thu, 02 Jul 2009 20:08:00 -0000 Message-ID: Subject: Re: [RFA] Fix too many "no debugging symbols found" warnings. From: Doug Evans To: Pedro Alves Cc: Eli Zaretskii , tromey@redhat.com, gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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/msg00083.txt.bz2 On Thu, Jul 2, 2009 at 6:27 AM, Pedro Alves wrote: >> 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. =A0Let's focus on that first. I'm not sure that's what I'd do first, but ok. [The problem I'm trying to solve hasn't changed, I figured we'd just focus on that.] > This could be > reasonable, I suppose: > > set print symbol-loading auto|on|off > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^ =A0^ =A0 ^ > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0| =A0 | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0| =A0 +- never > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0| > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | =A0+----- always, o= utput even when gdb auto-loads > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 | > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 +-------- default, ou= tput only when gdb auto-loads > > although IIUC, GDB never behaved like that "on" setting, so maybe we can > ignore that option, and think of "auto" -> "on". =A0OTOH, the "on" above > matches what "set verbose" does. =A0Keep reading. > >[...] > > Thirdly, symbol-loading-warnings is a compatible renaming of > > symbol-loading [...] > > That's ingenious, but overboard, if you ask me. =A0An even more compatible > change would be to not change the command name at all. I wouldn't categorize it as ingenious. Overboard, I dunno, it's just an option name. I'm not sure different levels of compatibility are at play here, really, but ok, if you strongly want one or not want the other I can go with the flow here. >> >> Fourth, gdb doesn't print symbol loading messages if (!from_tty && >> !info_verbose). > > Right... > >> Except for the "no debugging symbols found" warning, >> "print symbol-loading" doesn't apply unless either of those flags are >> true (in current cvs). > > ... and isn't this the real problem here? =A0If 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? =A0Can't we > just decide to output that latter warning under the same predicate as > for the former "Reading..." output? =A0It seems clear to me that it's > formatting intent was to be always output in between > the "from foo.so..." and "...done." bits. > > =A0"Reading symbols from /lib/librt.so.1...(no debugging symbols found)..= .done." > > That is, it was missing a "(from_tty || info_verbose)" check? > > Why do we need the new option for this specific warning at all? If that's what users want, great. The question I have is: for the case of auto-loaded libraries do they want the warning and otherwise have gdb stay silent? In the case of a smallish number of libraries it sounds reasonable to me, but whatever, I can go with the flow here too. :-) >> Put this all together and that's why the patch is the way it is. >> >> Ultimately, I don't have a strong opinion on having both options. =A0I >> 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. =A0If GDB is *already printing somethi= ng*, > like: > > =A0"Reading symbols from /lib/librt.so.1... ...done." > > ... then it should not be a problem for anyone to see this: > > =A0"Reading symbols from /lib/librt.so.1...(no debugging symbols found)..= .done." I think that's a given, and the patch has that behavior intentionally. > OTOH, if GDB is printing nothing, then printing a sole: > > =A0"(no debugging symbols found)" > > out of the blue, doesn't ever seem useful to me. =A0Is that ever really u= seful? Well, s@no debugging symbols found@no debugging symbols found in /usr/lib/libfoo.so@. Users would like to know that something isn't going to work because debug info is missing. That is useful. We could tell them differently of course. Maybe an option to "info shared" to only show the ones without debug info or some such. > Wouldn't tweaking the "no debugging symbols found" predicate make everyon= e happy? "Tweaking" as in only printing "no debugging symbols found [in /usr/lib/libfoo.so]" if (from_tty || info_verbose), and never printing it for auto-loaded libraries? Or something else?