This is the mail archive of the
mailing list for the GCC project.
Re: Need doc of debug output produced by -fdump-translation-unit
- From: Jim Wilson <wilson at specifixinc dot com>
- To: Holger Peine <peine at iese dot fraunhofer dot de>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 07 Jun 2004 10:47:14 -0700
- Subject: Re: Need doc of debug output produced by -fdump-translation-unit
- References: <firstname.lastname@example.org>
Holger Peine wrote:
I would like to use gcc as a front-end for a source code analysis tool.
gcc -fdump-translation-unit produces output which seems quite promising
for my purpose. Is the format of that output documented anywhere?
No. This info is only intended to help with debugging gcc, and it is
deliberately incomplete in some ways.
FSF policy forbids us from writing information into intermediate files
and then reading it back in later. This is because of concerns that
someone might use this feature to subvert the GPL. If a proprietary
compiler can exchange intermediate files with gcc, then they can avoid
linking with any gcc code, and thus avoid the GPL. The
-fdump-translation-unit stuff is thus intentionally crippled to try to
prevent this from happening.
Many of us would like to see this policy changed, as it hampers gcc
development, but we must respect FSF policy.
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com