From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19298 invoked by alias); 8 Nov 2013 15:47:25 -0000 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 Received: (qmail 19286 invoked by uid 89); 8 Nov 2013 15:47:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.3 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPAM_SUBJECT autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from Unknown (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Fri, 08 Nov 2013 15:46:27 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id BF4121167CC; Fri, 8 Nov 2013 10:46:49 -0500 (EST) 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 DNwYzuOP3Tv3; Fri, 8 Nov 2013 10:46:49 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5AE561167BF; Fri, 8 Nov 2013 10:46:49 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 2EA15E9984; Fri, 8 Nov 2013 19:46:15 +0400 (RET) Date: Fri, 08 Nov 2013 16:13:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [RFA/Ada(v2) 1/3] Add command to list Ada exceptions Message-ID: <20131108154615.GB4585@adacore.com> References: <1383912219-13012-1-git-send-email-brobecker@adacore.com> <1383912219-13012-2-git-send-email-brobecker@adacore.com> <527CDD03.9000200@redhat.com> <20131108133725.GA4585@adacore.com> <87li0zq7jq.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87li0zq7jq.fsf@fleche.redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-11/txt/msg00240.txt.bz2 > Joel> + if (regexp != NULL) > Joel> + { > Joel> + preg = alloca (sizeof (regex_t)); > > I think regex_t is sufficiently small that you might as well declare an > object in the outer scope and avoid alloca. Sure, I can do that. I found this to be a fairly interesting approach, because it avoids the need to check regexp repeatedly in order to decide whether to pass &preg, or NULL. > Joel> + discard_cleanups (old_chain); > > This leaks anything done by compile_rx_or_error. I think you need to > pass an inner cleanup to do_cleanups. Oops. I will fix! Thank you :) -- Joel