From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18524 invoked by alias); 18 Oct 2007 05:39:12 -0000 Received: (qmail 18436 invoked by uid 22791); 18 Oct 2007 05:39:11 -0000 X-Spam-Check-By: sourceware.org Received: from 216-129-118-140.cust.layer42.net (HELO bluesmobile.specifix.com) (216.129.118.140) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 18 Oct 2007 05:39:07 +0000 Received: from [127.0.0.1] (bluesmobile.specifix.com [216.129.118.140]) by bluesmobile.specifix.com (Postfix) with ESMTP id C9A173B817; Wed, 17 Oct 2007 22:26:42 -0700 (PDT) Subject: Re: Unnecessary thread_db message? From: Michael Snyder To: Jim Blandy Cc: Vladimir Prus , gdb@sources.redhat.com In-Reply-To: References: <200710171131.48034.ghost@cs.msu.su> Content-Type: text/plain Date: Thu, 18 Oct 2007 05:39:00 -0000 Message-Id: <1192685758.25099.92.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 (2.10.3-4.fc7) Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-10/txt/msg00130.txt.bz2 On Wed, 2007-10-17 at 16:04 -0700, Jim Blandy wrote: > Vladimir Prus 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...