Is there a way to generate a cross reference listing for a c/c++ program using gcc?
Is there a way to generate a cross reference listing for a c/c++ program using gcc?
Re: Is there a way to generate a cross reference listing for a c/c++ program using gcc?
Eric writes: > > -Wl,-Map=mapfile.map,--cref > I'm not looking for a cross-reference from a symbol to its memory location in linked file, rather a cross-reference from a symbol definition in a program source file to its line number references in all the program source files.
Re: Is there a way to generate a cross reference listing for a c/c++ program using gcc?
William Beebe writes: > >If you want that kind of cross referencing, then you shouild look at Doxygen (http://www.stack.nl/~dimitri/doxygen/) > I need the cross-reference output from the compiler because I want to write a source code browser like LXR. That's why I asked the question. Again, is there a way to generate a cross-reference listing for a c/c++ program using gcc? If not, the has anyone considered adding a gcc compiler option to output cross-reference information?
Re: Is there a way to generate a cross reference listing for a c/c++ program using gcc?
William Beebe writes: > >... If you want what LXR provides (and yes, I looked it up) then get Doxygen > Not only does Doxygen not meet my requirements, but also it doesn't make much sense to me for each cross-reference tool to implement its own source code parser and symbol database when the symbol information could be (optionally) output by the compiler and subsequently processed into a database file by a utility program. But, I guess we'll just have to agree to disagree. > >... why don't you write that cross-reference output feature? > Is anyone else planning on or interested in adding a symbol cross-reference option to gcc for the "C" programming language? Are there any objections to adding a symbol cross-reference option to gcc for the "C" programming language?
gcc cross-reference
A while back I asked whether gcc provided a cross-reference utility and the answer was "NO" so I prototyped my own cross-referencing program using gcc and tcl/tk. I'd like to get some feedback--for example, usability of the program relative to other cross-referencing programs--so I have cross-referenced linux and gcc sources and made the program and databases available for download from my web site www.pjalbrecht.com. Paul Albrecht
question about gcc
Is there some reason gcc hasn't been or can't be enhanced to provide output for a cross-referencing programs? Paul Albrecht
Re: question about gcc
From: "Robert Dewar" <[EMAIL PROTECTED]> > Paul Albrecht wrote: > > Is there some reason gcc hasn't been or can't be enhanced to provide output > > for a > > cross-referencing programs? > > > > No reason why it can't be, and the reason it hasn't is that no one has done > it. Actually strictly you don't mean gcc > here, you are referring to particular front ends, since the notion of > referencing is somewhat language dependent. > So probably you are thinking of C and/or C++. Note that GNAT, the Ada front > end, does indeed output full > information for xref purposes, in the form of alibfiles (it would indeed be > nice if the C++ compiler > would generate something similar!) > > I took a swipe at the c front end and have cross-referenced linux and gcc using my hacked gcc. I'd like to get some feedback from the gcc community. You can check out my results at my web site www.pjalbrecht.com. Paul Albrecht
Re: question about gcc
From: "Jim Wilson" <[EMAIL PROTECTED]> > Paul Albrecht wrote: > > Is there some reason gcc hasn't been or can't be enhanced to provide output > > for > > cross-referencing programs? > > FYI, there are a number of tools available for producing > cross-referencing info. See for instance > http://www.gnu.org/software/global/links.html > and try looking at the up-link to global itself also. I found this by > searching on the GNU web site. I've never used global myself. > I'm not really so much interested in particular cross-referencing programs as I am interested in whether the gcc community has considered providing compiler output to cross-referencing programs via a front end option. Paul Albrecht