* Unnecessary thread_db message?
@ 2007-10-17 7:32 Vladimir Prus
2007-10-17 23:04 ` Jim Blandy
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2007-10-17 7:32 UTC (permalink / raw)
To: gdb
Over in linux-thread-db.c, there's code like this:
void
check_for_thread_db (void)
{
/* First time through, report that libthread_db was successfuly
loaded. Can't print this in in thread_db_load as, at that stage,
the interpreter and it's console haven't started. */
if (!already_loaded)
{
printf_unfiltered (_("Using host libthread_db library \"%s\".\n"),
library);
The printf is totally unconditional. When gdb is started with the --quiet option,
this line is the only thing printed. The problem is that this message means nothing
to ordinary user -- he does not know what's thread_db is, and possibly has no idea
if, say, "/lib/tls/i686/cmov/libthread_db.so.1" is the right library to load.
This message seems more like debug print -- so can we print it only when some
verbose flag is set?
- Volodya
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unnecessary thread_db message?
2007-10-17 7:32 Unnecessary thread_db message? Vladimir Prus
@ 2007-10-17 23:04 ` Jim Blandy
2007-10-18 5:39 ` Michael Snyder
0 siblings, 1 reply; 3+ messages in thread
From: Jim Blandy @ 2007-10-17 23:04 UTC (permalink / raw)
To: Vladimir Prus; +Cc: gdb
Vladimir Prus <ghost at cs.msu.su> writes:
> Over in linux-thread-db.c, there's code like this:
>
> void
> check_for_thread_db (void)
> {
> /* First time through, report that libthread_db was successfuly
> loaded. Can't print this in in thread_db_load as, at that stage,
> the interpreter and it's console haven't started. */
>
> if (!already_loaded)
> {
> printf_unfiltered (_("Using host libthread_db library \"%s\".\n"),
> library);
>
>
> The printf is totally unconditional. When gdb is started with the --quiet option,
> this line is the only thing printed. The problem is that this message means nothing
> to ordinary user -- he does not know what's thread_db is, and possibly has no idea
> if, say, "/lib/tls/i686/cmov/libthread_db.so.1" is the right library to load.
> This message seems more like debug print -- so can we print it only when some
> verbose flag is set?
At least. I don't think it should be printed at all --- there could
be an 'info' subcommand to show this kind of information, but as you
say, it's not something the user normally cares about.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Unnecessary thread_db message?
2007-10-17 23:04 ` Jim Blandy
@ 2007-10-18 5:39 ` Michael Snyder
0 siblings, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2007-10-18 5:39 UTC (permalink / raw)
To: Jim Blandy; +Cc: Vladimir Prus, gdb
On Wed, 2007-10-17 at 16:04 -0700, Jim Blandy wrote:
> Vladimir Prus <ghost at cs.msu.su> writes:
> > Over in linux-thread-db.c, there's code like this:
> >
> > void
> > check_for_thread_db (void)
> > {
> > /* First time through, report that libthread_db was successfuly
> > loaded. Can't print this in in thread_db_load as, at that stage,
> > the interpreter and it's console haven't started. */
> >
> > if (!already_loaded)
> > {
> > printf_unfiltered (_("Using host libthread_db library \"%s\".\n"),
> > library);
> >
> >
> > The printf is totally unconditional. When gdb is started with the --quiet option,
> > this line is the only thing printed. The problem is that this message means nothing
> > to ordinary user -- he does not know what's thread_db is, and possibly has no idea
> > if, say, "/lib/tls/i686/cmov/libthread_db.so.1" is the right library to load.
> > This message seems more like debug print -- so can we print it only when some
> > verbose flag is set?
>
> At least. I don't think it should be printed at all --- there could
> be an 'info' subcommand to show this kind of information, but as you
> say, it's not something the user normally cares about.
Yeah, seems like the notification-worthy event would be if it
*fails* to find or connect to the library. So long as that case
is covered, we could maybe conditionalize this one on info_verbose.
Hey, you ask for verbose, you're gonna get verbose. Don't see
a reason to eliminate it entirely...
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-18 5:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-17 7:32 Unnecessary thread_db message? Vladimir Prus
2007-10-17 23:04 ` Jim Blandy
2007-10-18 5:39 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).