From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31611 invoked by alias); 15 Aug 2002 22:33:16 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 31406 invoked from network); 15 Aug 2002 22:33:13 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 15 Aug 2002 22:33:13 -0000 Received: from int-mx2.corp.redhat.com (nat-pool-rdu.redhat.com [172.16.52.200] (may be forged)) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id g7FMJJl23854 for ; Thu, 15 Aug 2002 18:19:20 -0400 Received: from potter.sfbay.redhat.com (potter.sfbay.redhat.com [172.16.27.15]) by int-mx2.corp.redhat.com (8.11.6/8.11.6) with ESMTP id g7FMXAu27257; Thu, 15 Aug 2002 18:33:10 -0400 Received: from romulus.sfbay.redhat.com (remus.sfbay.redhat.com [172.16.27.252]) by potter.sfbay.redhat.com (8.11.6/8.11.6) with ESMTP id g7FMX9e03935; Thu, 15 Aug 2002 15:33:09 -0700 Received: (from kev@localhost) by romulus.sfbay.redhat.com (8.11.6/8.11.6) id g7FMX3c07496; Thu, 15 Aug 2002 15:33:03 -0700 Date: Thu, 15 Aug 2002 15:33:00 -0000 From: Kevin Buettner Message-Id: <1020815223303.ZM7495@localhost.localdomain> In-Reply-To: Andrew Cagney "Issue an internal warning on first deprecated function call" (Aug 15, 6:00pm) References: <3D5C248D.4030003@ges.redhat.com> To: Andrew Cagney , gdb@sources.redhat.com Subject: Re: Issue an internal warning on first deprecated function call MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-08/txt/msg00169.txt.bz2 On Aug 15, 6:00pm, Andrew Cagney wrote: > The problem behind this was discussed in: > http://sources.redhat.com/ml/gdb/2001-03/msg00227.html > > The idea is to issue an internal-warning on the first call to a > deprecated [multi-arch] function. > > The intent is to better alert the user to the possability that their GDB > is on its last legs. > > Thoughts? Variations on the idea? I think we should strive to just fix (eliminate) the calls to deprecated functions instead. However, there are times when it's too hard or can't be sufficiently tested. A variation on the above idea is to scan a newly created gdbarch struct to see if any deprecated functions are being used. If so, print only one message per session. (I.e, instead of seeing N messages from N deprecated function, you'd only see one message for the whole lot.) The nuisance factor could be cut back even further if we arrange for .gdbinit setting which can be used to disable such messages. This variation will also cause the message to be printed at a more predictable time, probably either at startup or just after a ``file'' operation. Kevin