From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29557 invoked by alias); 8 Jul 2009 21:53:37 -0000 Received: (qmail 29543 invoked by uid 22791); 8 Jul 2009 21:53:37 -0000 X-SWARE-Spam-Status: No, hits=-3.2 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_24,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Jul 2009 21:53:27 +0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MOf4r-0002uj-JM for gcc@gcc.gnu.org; Wed, 08 Jul 2009 21:53:21 +0000 Received: from r74-192-33-183.vctrcmta01.vctatx.tl.dh.suddenlink.net ([74.192.33.183]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jul 2009 21:53:21 +0000 Received: from cppljevans by r74-192-33-183.vctrcmta01.vctatx.tl.dh.suddenlink.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 08 Jul 2009 21:53:21 +0000 To: gcc@gcc.gnu.org From: Larry Evans Subject: avoiding gdb cc1plus PACK_EXPANSION_PATTERN(result) gives 'No symbol "__extension__"', error msg Date: Wed, 08 Jul 2009 21:53:00 -0000 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 2.0.0.22 (X11/20090608) 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/msg00148.txt.bz2 I compiled gcc with -g3 -O0' compiler flags to enable invocation of macros during a gdb session; however, the macro, PACK_EXPANSION_PATTERN, apparently uses a symbol: __extension__ not understood by gdb. How can gdb be made to understand __extension__ or how can __extension__ be rm'ed from the macros? More specifically, while in pt.c: http://gcc.gnu.org/viewcvs/trunk/gcc/cp/pt.c?revision=149351&view=markup at around line 2671, I got: (gdb) p PACK_EXPANSION_PATTERN(result) No symbol "__extension__" in current context. (gdb) Now, I could use 'macro exp' as follows: (gdb) macro exp PACK_EXPANSION_PATTERN(result) expands to: (((enum tree_code) (result)->base.code) == TYPE_PACK_EXPANSION? __extension__ (*({__typeof (result) const __t = (result); &__t->common.type; })) : __extension__ (*({__typeof (result) const __t = __extension__ ({ __typeof (result) const __t = (result); char const __c = tree_code_type[(int) (((enum tree_code) (__t)->base.code))]; if (!((__c) >= tcc_reference && (__c) <= tcc_expression)) tree_class_check_failed (__t, tcc_expression, __FILE__, __LINE__, __FUNCTION__); __t; }); const int __i = (0); if (__i < 0 || __i >= tree_operand_length (__t)) tree_operand_check_failed (__i, __t, __FILE__, __LINE__, __FUNCTION__); &__t->exp.operands[__i]; }))) (gdb) However, that's very hard to parse (FWIW, the result I was looking for was result->common.type; however, my first guess was result->exp.operands[0], and that was wrong :( ) It would be much easier if gdb understood __extension__. Is there a way? TIA. -regards, Larry