This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Symbol table (and associated) output from compiler front-ends?


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]