This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Symbol table (and associated) output from compiler front-ends?
- To: bruce at cenderis dot demon dot co dot uk
- Subject: Re: Symbol table (and associated) output from compiler front-ends?
- From: Martin von Loewis <martin at mira dot isdn dot cs dot tu-berlin dot de>
- Date: Fri, 22 May 1998 10:29:45 +0200
- CC: egcs at cygnus dot com
- References: <m3ra1nqpls.fsf@cenderis.demon.co.uk>
> Suppose I wanted to write a source navigator. (Not all the extra
> stuff that Cygnus's Source Navigator product has---just the pure
> finding definitions, showing call-graphs, showing variable definitions
> and usages, and that kind of stuff.)
>
> What help can gcc give me? -dM is documented to provide macro
> definitions, which is clearly useful, and the -M family of flags can
> give information about included files. And just looking at the symbol
> table (using nm) can give me defined (external) symbols.
>
> Can I get any more?
Have you tried 'g++ -fxref foo.cc'? This will give you
.foo.cc.gxref. Finding documentation on it and interpreting the output
is left as an exercise for the reader :-)
Martin