This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] Fix too many "no debugging symbols found" warnings.

On Thursday 02 July 2009 21:08:22, Doug Evans wrote:
> On Thu, Jul 2, 2009 at 6:27 AM, Pedro Alves<> wrote:

> > That's ingenious, but overboard, if you ask me.  An 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.

Maybe something in the middle? :-)

Overboard in the sense that it's a scretch at trying to make
backwards compatibility with an option that doesn't do the same thing.
I'm of the opinion that if the previous option isn't useful at all,
then we should just go with a new name for this one, no need for backwards
compat with an option that not many people other than your google users 
have had much exposure (it's not an officially released option).  It kind
of defeats the idea of having stable releases to have to care for such
backwards compatibility. issues.

> 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.

I guess I'm just of the camp that considers this a different option
to the current one.

Okay, I'm so close to start going with the flow too.  :-)

> >>
> >> 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? ?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" and "...done." bits.
> >

> 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?

I see what you mean.  If the answer to that is true, then we do want
a distinct command for this.

> In the case of a smallish number of libraries it sounds reasonable to
> me, but whatever, I can go with the flow here too. :-)

You mean, flow away? :-)

> > I think we're complicating things. ?If GDB is *already printing something*,
> > like:
> >
> > ?"Reading symbols from /lib/ ...done."
> >
> > ... then it should not be a problem for anyone to see this:
> >
> > ?"Reading symbols from /lib/ 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:
> >
> > ?"(no debugging symbols found)"
> >
> > out of the blue, doesn't ever seem useful to me. ?Is that ever really useful?
> Well, s@no debugging symbols found@no debugging symbols found in
> /usr/lib/

What's the output in the non-auto-loaded case, then?

 "Reading symbols from /lib/ (no debugging symbols found in /lib/ ...done."


> Users would like to know that something isn't going to work because
> debug info is missing.
> That is useful.

It is useful to know when a module doesn't have debug info, sure, but,
that transient warning has been printed like that for years, as is,
without showing the shared library name.  In that state, I'm not sure
how useful it has been.  It appears to me we have some freedom to play
with it, and when it is printed.

> We could tell them differently of course. ?Maybe an option to "info
> shared" to only show the ones without debug info or some such.

We do have a "Syms Read" column in info shared's output, maybe we
should extend that from "Yes, No" -> "Yes, Sorry-I've-tried-but-didn't-find-any, No".
Then the user could ask GDB if it has debug info any time, instead of having
to look up the log.

> > Wouldn't tweaking the "no debugging symbols found" predicate make everyone happy?
> "Tweaking" as in only printing "no debugging symbols found [in
> /usr/lib/]" if (from_tty || info_verbose), and never printing
> it for auto-loaded libraries?

s/auto-loaded libraries/auto-loaded libraries, modules, executables, whatnot/,

I'll back away from arguing now, and let you decide to do what you think
is best.  I don't think I'll be miserable with the change.  (though with a feeling
of wrongly named option in my stomach.)

Pedro Alves

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]