From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5195 invoked by alias); 9 Aug 2010 18:23:52 -0000 Received: (qmail 5187 invoked by uid 22791); 9 Aug 2010 18:23:52 -0000 X-SWARE-Spam-Status: No, hits=-6.0 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; Mon, 09 Aug 2010 18:23:47 +0000 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o79INk1g018723 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 9 Aug 2010 14:23:46 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o79INhRf014567 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 9 Aug 2010 14:23:45 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o79INhbQ027652; Mon, 9 Aug 2010 20:23:43 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o79INgEl027651; Mon, 9 Aug 2010 20:23:42 +0200 Date: Mon, 09 Aug 2010 18:23:00 -0000 From: Jan Kratochvil To: sami wagiaalla Cc: gdb-patches@sourceware.org Subject: Re: [patch] smart pointer support Message-ID: <20100809182342.GA27392@host1.dyn.jankratochvil.net> References: <201008061648.o76Gmk3o008780@d12av02.megacenter.de.ibm.com> <4C5C7FAB.2090005@redhat.com> <4C6025EF.5080509@redhat.com> <4C60431F.4040705@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C60431F.4040705@redhat.com> User-Agent: Mutt/1.5.20 (2009-12-10) 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: 2010-08/txt/msg00107.txt.bz2 On Mon, 09 Aug 2010 20:04:15 +0200, sami wagiaalla wrote: > + > + /* Check to see if the operator '->' has been overloaded. If the operator > + has been overloaded replace arg2 with the value returned by the custom > + operator and continue evaluation. */ > + while (unop_user_defined_p (op, arg2)) > + { > + volatile struct gdb_exception except; > + struct value *value = NULL; > + TRY_CATCH (except, RETURN_MASK_ERROR) > + { > + value = value_x_unop (arg2, op, noside); > + } > + > + if (except.reason < 0) > + break; What if some other error kind occurs? It would get hidden. Such as: error (_("This target does not support function calls.")); In the case you want to go with the TRY_CATCH case you should IMO specialize the error message you want to catch to some: throw_error (THE_GREAT_NEW_KIND_OF_ERROR, that message); To correctly check just that specific error kind in EXCEPT (and throw it again otherwise). OTOH I believe instead of making a new special kind of error message the function calling schematics could be changed to not error itself and return some normal error return value instead. Regards, Jan