This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: FW: Symbol Table Export From GCC?
- From: Tom Tromey <tromey at redhat dot com>
- To: "Gary Jackson" <silverb at iprimus dot com dot au>
- Cc: <gcc at gcc dot gnu dot org>
- Date: Fri, 14 Sep 2007 16:52:44 -0600
- Subject: Re: FW: Symbol Table Export From GCC?
- References: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAAGW25/BgqWUGede9obagACMKAAAAQAAAAXF+q3KHx0EW7hdUX2eR9QgEAAAAA@iprimus.com.au>
- Reply-to: tromey at redhat dot com
>>>>> "Gary" == Gary Jackson <silverb@iprimus.com.au> writes:
Gary> I am developing a software analysis tool and wanted to , if I
Gary> can, make it accept information exported from gcc compilations
Gary> of C++ code, for example.
If it is free software, how about putting it directly into g++?
If it is not free software... I'm afraid you are looking at the wrong
compiler.
Gary> Can you give me any hints as to where to look (e.g. which files)
Gary> to find such cross reference information?
Really you're talking about the compiler IR. There's some
documentation, e.g., c-tree.texi. This stuff isn't really kept in one
place, it is spread out all over; which makes sense since this is the
major thing that a front end computes.
Gary> Has anyone written something already for the compiler suite that will
Gary> export the symbod table for use by external tools?
Search through the archives, I think there are several threads about
this. IIRC in the past there were some political difficulties in this
area; but these days perhaps (I hope) the situation may be changing.
It is hard to know.
Gary> I figure if there was information in a symbol table as opposed to in a
Gary> tree it would be easier to process.
Perhaps I'm misunderstanding you... any C-like language is going to
have multiple scopes whose natural representation is a tree. For C++
the situation is going to be even more complicated.
Tom