C/C++ cross reference tool 
Author Message
 C/C++ cross reference tool

Does anybody know of a freeware or shareware program that will produce a
text file that contains a cross reference of the functions contained in
a collection of source files?  I am looking primarily for a list of
"who calls who".  Ideally it would process C and C++ source files and
produce three lists:

list 1 would be a list of functions defined within each source file;

list 2 would show, for each function defined, the source file it was
defined in and what functions it calls;

list 3 would show, for each function defined, what other functions call
it.


      [ about comp.lang.c++.moderated. First time posters: do this! ]
--



Sat, 22 Sep 2001 03:00:00 GMT  
 C/C++ cross reference tool


Quote:
> Does anybody know of a freeware or shareware program that will produce a
> text file that contains a cross reference of the functions contained in
> a collection of source files?  I am looking primarily for a list of
> "who calls who".  Ideally it would process C and C++ source files and
> produce three lists:

> list 1 would be a list of functions defined within each source file;

> list 2 would show, for each function defined, the source file it was
> defined in and what functions it calls;

> list 3 would show, for each function defined, what other functions call
> it.

The IDE within Microsoft's Visual C++ will identify (on a function by
function basis) the information you seek, provided you have turned on the
"enable browser info" switch.  It's obviously not shareware/freeware and it
won't generate a separate text file, but on a one-by-one basis it's not bad.
In addition, under the File View option if you examine the properties of a
specific source file, you can identify the set of #include files on which a
given .c/.cpp file depends.  This helps to find and eliminate some of the
compile-time dependencies.

Also, about a year or so ago there was an article in one of the MS/Windows
magazines (Microsoft Systems Journal, perhaps) about writing a program to
read and process the VC++ browser info generated by the compiler.  This
could probably modified to produce the reports you desire.

--



Tue, 25 Sep 2001 03:00:00 GMT  
 C/C++ cross reference tool

Quote:

>Does anybody know of a freeware or shareware program that will produce a
>text file that contains a cross reference of the functions contained in
>a collection of source files?  I am looking primarily for a list of
>"who calls who".  Ideally it would process C and C++ source files and
>produce three lists:

(From a newbie to this group.)

The piece of software you are looking for is called a "Static Analyser". I
will tell you now that I have never come across such a piece of software for
the PC.

The only proper Static Analyser I have come across was ~5yrs ago on  a
Silicon Graphics workstation, and was part of a development suite called
"Case Vision". Not only could you generate a complete cross reference for
your C/C++ files, functions etc. but it could also display these
dependencies graphically allowing you to navigate between function calls and
definitions, say.

Now for the best bit. What separates a static analyser apart from the
(rather good) browser in MSVC++ is that the Case Vision static analyser does
not even require the code to compile, in order for it to produce the
dependencies and cross references. This is a big advantage compared to MSVC
where it is not possible to generate browser information untill all of the
files are compiled.

Good luck with your search for this software. If you ever find something
like it I would love to hear about it.
Sorry I can't be of more help.

Alan James

##########################################
This email, its content and any files transmitted with it are intended
solely for the addressee(s) and may be legally privileged and/or
confidential. Access by any other party is unauthorised without the
express written permission of the sender. If you have received this
email in error you may not copy or use the contents, attachments or
information in any way. Please destroy it and contact the sender on
the number printed above, via the Dresdner Kleinwort Benson
switchboard on +44 171 623 8000 or via e-mail return. Internet
communications are not secure unless protected using strong
cryptography. This email has been prepared using information believed
by the author to be reliable and accurate, but Dresdner Kleinwort
Benson makes no warranty as to accuracy or completeness. In particular
Dresdner Kleinwort Benson does not accept responsibility for changes
made to this email after it was sent. Any opinions expressed in this
document are those of the author and do not necessarily reflect the
opinions of the Bank or its affiliates. They may be subject to change
without notice.
##########################################
--



Tue, 25 Sep 2001 03:00:00 GMT  
 C/C++ cross reference tool

Quote:

> Does anybody know of a freeware or shareware program that will produce a
> text file that contains a cross reference of the functions contained in
> a collection of source files?  I am looking primarily for a list of
> "who calls who".  Ideally it would process C and C++ source files [...]

I don't know about shareware or freeware, but Software Blacksmiths has an
inexpensive version, called Cref and CDoc.  Check their link out:

        http://www.swbs.com/cref.html

--
Scott G. Hall
GTE Government Systems
North Carolina Systems Center

--



Tue, 25 Sep 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. Cross reference tools for C/C++ under Unix

2. Newbie: separate big .cs file into small .cs files

3. C functions cross-referencing tool

4. PD cross referencing tool??

5. HELP: Cross reference tool wanted

6. cross-reference tools wanted (ctree/ctrace?)

7. Cross-referencing tool

8. Tool for cross references in C ???

9. Reference.cs Generated with Parameters Reversed

10. C/C++ Cross Reference Utilities - Recommendation

11. Need C++ text for non cs major course

12. Cross-referencing classes

 

 
Powered by phpBB® Forum Software