This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Unnecessary thread_db message?
- From: Jim Blandy <jimb at codesourcery dot com>
- To: Vladimir Prus <ghost at cs dot msu dot su>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 17 Oct 2007 16:04:53 -0700
- Subject: Re: Unnecessary thread_db message?
- References: <200710171131.48034.ghost@cs.msu.su>
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.