Newsgroups: | comp.compilers |
From: | ddunn@netcom.com (David A Dunn) |
Keywords: | tools, C, comment |
Organization: | NETCOM On-line Communication Services (408 261-4700 guest) |
References: | 94-07-090 94-08-025 |
Date: | Sat, 13 Aug 1994 05:17:41 GMT |
Along these same lines, a tool which would generate a symbol usage DAG
for an entire (very large) program could be extremely valuable.
For example:
----bar.h-------
#define SOME_VALUE 8
----foo.c-------
include "bar.h"
int global1;
foo()
{
global1 = SOME_VALUE;
}
main()
{
if (global1 == foo())
....
}
----------------------------------
Would produce something like this:
foo.c:main() -> foo.c:foo()
foo.c:global1;
foo.c:foo() -> foo.c:global1;
bar.h:SOME_VALUE
----------------------------------
For analyzing old code this kind of information could potentially
save you all kinds of grief. So does anyone have some time to
modify gcc and a linker???
Dave Dunn
[There are plenty of C cross-referencers, though I don't know of any that
deal well with preprocessor symbols. -John]
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.