This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: avoiding gdb cc1plus PACK_EXPANSION_PATTERN(result) gives 'No symbol "__extension__"', error msg


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]