From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17678 invoked by alias); 25 Jan 2011 05:11:03 -0000 Received: (qmail 17653 invoked by uid 22791); 25 Jan 2011 05:11:01 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 25 Jan 2011 05:10:55 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id p0P5AsxG011105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 25 Jan 2011 00:10:54 -0500 Received: from mesquite.lan (ovpn-113-42.phx2.redhat.com [10.3.113.42]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p0P5ArbV022495 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Tue, 25 Jan 2011 00:10:53 -0500 Date: Tue, 25 Jan 2011 08:42:00 -0000 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: deprecated_throw_reason? (was Re: New ARI warning Tue Jan 25 01:55:01 UTC 2011) Message-ID: <20110124221053.1f12ee32@mesquite.lan> In-Reply-To: <20110125015501.GA4054@sourceware.org> References: <20110125015501.GA4054@sourceware.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-01/txt/msg00483.txt.bz2 On Tue, 25 Jan 2011 01:55:01 +0000 GDB Administrator wrote: > > gdb/remote-mips.c:513: deprecated: deprecated throw_reason: Do not use deprecated throw_reason, see declaration for details > gdb/remote-mips.c:513: deprecated_throw_reason (RETURN_ERROR); [...] > > gdb/remote-mips.c:2285: deprecated: deprecated throw_reason: Do not use deprecated throw_reason, see declaration for details > gdb/remote-mips.c:2285: deprecated_throw_reason (RETURN_QUIT); Does anyone know how these uses of deprecated_throw_reason should be fixed? I've looked at the comment before the declaration of deprecated_throw_reason(). It reads as follows: /* Instead of deprecated_throw_reason, code should use catch_exception and throw_exception. */ extern void deprecated_throw_reason (enum return_reason reason) ATTRIBUTE_NORETURN; This sort of makes sense, except that the code in question just wants to do a throw. I suppose I could try to inline the relevant bits from the definition of deprecated_throw_reason(), but that seems ugly. I've also looked at the patch where throw_reason() was deprecated. See: http://sourceware.org/ml/gdb-patches/2005-01/msg00199.html It's interesting to note that with the exception of a use of deprecated_throw_reason() in breakpoint.c, all other uses (where the files still exist) are still in the gdb sources today. I've also looked at the definition of deprecated_throw_reason(). It seems to me that it's a convenient wrapper for throw_exception(). I'm wondering if deprecated_throw_reason() ought not to have been deprecated? (Note that Eli objected to the patch which performed the deprecation precisely because no example was given as to how to perform the conversions - well, at least that's my reading of it.) Kevin