Richard Henderson <r...@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

Reply via email to