public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Richard Henderson <rth@redhat.com>
Cc: Larry Evans <cppljevans@suddenlink.net>, gcc@gcc.gnu.org
Subject: Re: avoiding gdb cc1plus PACK_EXPANSION_PATTERN(result) gives 'No  symbol  "__extension__"', error msg
Date: Thu, 09 Jul 2009 04:27:00 -0000	[thread overview]
Message-ID: <m363e27a7o.fsf@google.com> (raw)
In-Reply-To: <4A551A3C.7020606@redhat.com> (Richard Henderson's message of "Wed\, 08 Jul 2009 15\:14\:20 -0700")

Richard Henderson <rth@redhat.com> writes:

> 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.

Conveniently, if you build with C++, the inline functions can return
references, so you don't have to change hundreds of occurrences of
  REG_ATTRS (x) = ...;
into
  SET_REG_ATTRS (x, ...);

You do still have to face the problem that the macros are often defined
before the structures that they use, so simple replacement with inline
functions fails.

Ian

  parent reply	other threads:[~2009-07-09  4:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-08 21:53 Larry Evans
2009-07-08 22:14 ` Richard Henderson
2009-07-09  2:53   ` Daniel Jacobowitz
2009-07-09  4:27   ` Ian Lance Taylor [this message]
2009-07-09 16:16 ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m363e27a7o.fsf@google.com \
    --to=iant@google.com \
    --cc=cppljevans@suddenlink.net \
    --cc=gcc@gcc.gnu.org \
    --cc=rth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).