Re: -fdump-translation-unit format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Stefan Zager <stefan.zager@xxxxxxx> writes:

> I've read a few variations of the disclaimer for this feature:
>
> "This is only meant to help gcc developers.  The format is not documented, and
> it's subject to change at any time."
>
> Nevertheless, the dump output is enormously useful.  We parse it and use it to
> automatically generate scripting language wrappers for API's that are
> impractical to wrap using other methods (like swig).
>
> The format generated by gcc-4.1.* and gcc-4.2.* is pretty consistent, but it
> appears to have changed significantly starting with 4.3.*.  In particular, in
> the newer format, the identifier_node for a type_decl doesn't show template
> parameters.  That has proven to be a show-stopper for us.
>
> Is it possible to recover the missing information, or generate it in a different
> way, using gcc-4.3+?

Probably, but I don't know for sure.

> And any chance for userland support for this feature?

No.  The -fdump files are for compiler developers.

There is a chance for userland support for a different feature, perhaps
along the lines of the existing -aux-info option.  If you can describe
exactly what it is that you want the compiler to dump, and if it seems
to be useful to people other than just you, then it may be possible to
implement it.  Of course, it's even more likely to happen if you send a
patch, although it would still be necessary for this feature to be
useful in general.

This is a case where writing a compiler plugin may be the best answer.
However, you will need to move up to gcc 4.5 for plugin support.

Ian


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux