From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31592 invoked by alias); 1 May 2013 16:57:57 -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 31583 invoked by uid 89); 1 May 2013 16:57:57 -0000 X-Spam-SWARE-Status: No, score=-5.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 01 May 2013 16:57:56 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r41GvssB020451 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 1 May 2013 12:57:54 -0400 Received: from host2.jankratochvil.net (ovpn-116-69.ams2.redhat.com [10.36.116.69]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r41GvpTp008318 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 1 May 2013 12:57:53 -0400 Date: Wed, 01 May 2013 16:57:00 -0000 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch 2/2] Assert leftover cleanups in TRY_CATCH Message-ID: <20130501165750.GA453@host2.jankratochvil.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-05/txt/msg00008.txt.bz2 Hi, as discussed in: Re: Cleanups and Exception handlers http://sourceware.org/ml/gdb/2013-05/msg00007.html Message-ID: <20130501152116.GA7529@host2.jankratochvil.net> this gdb_assert can be useful. Unfortunately there may be leftover "regressions" due to it not caught by the testsuite. Thanks, Jan gdb/ 2013-05-01 Jan Kratochvil * cleanups.c (restore_my_cleanups): New gdb_assert for SENTINEL_CLEANUP. diff --git a/gdb/cleanups.c b/gdb/cleanups.c index c403db7..02db9f5 100644 --- a/gdb/cleanups.c +++ b/gdb/cleanups.c @@ -261,6 +261,7 @@ save_final_cleanups (void) static void restore_my_cleanups (struct cleanup **pmy_chain, struct cleanup *chain) { + gdb_assert (*pmy_chain == SENTINEL_CLEANUP); *pmy_chain = chain; }