From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6182 invoked by alias); 9 Jul 2009 02:53:17 -0000 Received: (qmail 6164 invoked by uid 22791); 9 Jul 2009 02:53:15 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_24 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Jul 2009 02:53:08 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 797CC10576; Thu, 9 Jul 2009 02:53:05 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id 2415510554; Thu, 9 Jul 2009 02:53:04 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1MOjkt-0006nn-SN; Wed, 08 Jul 2009 22:53:03 -0400 Date: Thu, 09 Jul 2009 02:53:00 -0000 From: Daniel Jacobowitz To: Richard Henderson Cc: Larry Evans , gcc@gcc.gnu.org Subject: Re: avoiding gdb cc1plus PACK_EXPANSION_PATTERN(result) gives 'No symbol "__extension__"', error msg Message-ID: <20090709025303.GA26110@caradoc.them.org> Mail-Followup-To: Richard Henderson , Larry Evans , gcc@gcc.gnu.org References: <4A551A3C.7020606@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A551A3C.7020606@redhat.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-07/txt/msg00152.txt.bz2 On Wed, Jul 08, 2009 at 03:14:20PM -0700, Richard Henderson wrote: > On 07/08/2009 03:11 PM, Larry Evans wrote: > >It would be much easier if gdb understood __extension__. Is there a way? > > In this case, no. It's protecting a statement expression, which gdb > will never be able to parse. > > A better project for helping debug gcc would be to convert all macros > that use statement expressions into proper inline functions. Which > would then be emitted as out-of-line functions by gcc's > -fkeep-inlines flag, which would yield something that's callable from > within gdb. FWIW, as a GDB maintainer I completely agree with Richard. We could teach GDB to ignore __extension__, which is used in some other places (like "long long"). You can even do this from the command line using "macro define": (gdb) macro define __extension__ (gdb) p __extension__ 1 $1 = 1 That's all that's necessary; it's used to suppress warnings. Statement expressions, on the other hand, are right out. I can't see any practical way to teach GDB about that. -- Daniel Jacobowitz CodeSourcery