From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8586 invoked by alias); 11 Jun 2009 14:45:27 -0000 Received: (qmail 8561 invoked by uid 22791); 11 Jun 2009 14:45:25 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 11 Jun 2009 14:45:20 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 40A122BAB13; Thu, 11 Jun 2009 10:45:15 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id duS4p1TWaTuT; Thu, 11 Jun 2009 10:45:15 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 1F0D62BAB10; Thu, 11 Jun 2009 10:45:15 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 3283EF596C; Thu, 11 Jun 2009 10:45:13 -0400 (EDT) Date: Thu, 11 Jun 2009 14:45:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFC: next/finish/etc -vs- exceptions Message-ID: <20090611144513.GE25703@adacore.com> References: <20090610161204.GB25703@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-06/txt/msg00298.txt.bz2 > It would be nice if we had a flag day and simply converted everything > to breakpoint_ops. That's usually the best way to ensure that new > code is written the "right" way (gcc has also had some bad experiences > with these incomplete transitions). I tried to convert a few of them a few months back. The issue is that it's not always trivial, and sometimes the breakpoint_ops model doesn't fit well for the functionality that you're trying to provide. That's why I was asking whether you had a look at it, because I am not sure that it will work. But if it does, it really simplifies greatly the patch, or at least greatly reduces the number of places where you touch the code. > I was under the impression that Ada used longjmp to implement > exceptions, and so the existing longjmp support should work. (Modulo > the odd bug or two -- I'm not sure if Pedro's fix for the glibc > pointer mangling went in or not.) Actually, we have two possible mechanisms, but I think we prefer the "Zero Cost Exception" mechanism, which doesn't use setjmp/longjmp because having an exception handler then costs nothing. We assume that exceptions are rare occurences, and therefore don't wan't to spent time setting up a handler if we're not going to use it. -- Joel