From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10832 invoked by alias); 6 Feb 2013 16:54:13 -0000 Received: (qmail 10739 invoked by uid 22791); 6 Feb 2013 16:54:11 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS 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; Wed, 06 Feb 2013 16:54:01 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r16Gs0cN010324 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 6 Feb 2013 11:54:00 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id r16Grwd8008552 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 6 Feb 2013 11:53:59 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Subject: FYI: fix error in py-type.c Date: Wed, 06 Feb 2013 16:54:00 -0000 Message-ID: <877gmlxu1l.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain 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: 2013-02/txt/msg00150.txt.bz2 I'm checking this in. Today I resurrected my gcc plugin for checking gdb exception handling: http://sourceware.org/ml/gdb/2011-11/msg00002.html It found a bug in py-type.c: ../../archer/gdb/python/py-type.c:415: error: function typy_strip_typedefs is marked nothrow but can throw ../../archer/gdb/python/py-type.c:426: info: via call to check_typedef ../../archer/gdb/gdbtypes.c:1552: info: via call to lookup_symbol ../../archer/gdb/symtab.c:1225: info: via call to lookup_symbol_in_language ../../archer/gdb/symtab.c:1210: info: via call to lookup_symbol_aux ../../archer/gdb/symtab.c:1353: info: via call to error ../../archer/gdb/utils.c:720: info: via call to throw_verror The fix is to remove the extra call to check_typedef. It isn't needed anyway, due to the (correct) code earlier in the function. Built and tested on x86-64 Fedora 16. Tom 2013-02-06 Tom Tromey * python/py-type.c (typy_strip_typedefs): Don't call check_typedef outside of TRY_CATCH. Index: python/py-type.c =================================================================== RCS file: /cvs/src/src/gdb/python/py-type.c,v retrieving revision 1.46 diff -u -r1.46 py-type.c --- python/py-type.c 1 Jan 2013 06:33:01 -0000 1.46 +++ python/py-type.c 6 Feb 2013 16:50:53 -0000 @@ -423,7 +423,7 @@ } GDB_PY_HANDLE_EXCEPTION (except); - return type_to_type_object (check_typedef (type)); + return type_to_type_object (type); } /* Strip typedefs and pointers/reference from a type. Then check that