Access to symbol table from within a program
Sebastian Pop
m1sp@csc.liv.ac.uk
Fri Jan 25 07:05:00 GMT 2002
On Thu, Jan 24, 2002 at 03:22:04PM -0500, linguist-gcc@rich-paul.net wrote:
> the program so that I could show the names of the functions as
> they are called, something like:
>
> +main
> +myfunc1
> +myfunc2
> -myfunc2
> +myfunc3
> +myfunc2
> -myfunc2
> -myfunc3
> -myfunc1
> -main
>
> This would be really handy.
>
If I understand you want to print the function call graph ?
That could be done in the front end by dumping for each function declaration
every callee functions. You can construct the overall function call graph
by gathering all this information. So you can say at the end what part of
your system can be reached from the main function, and what are the functions
never reached.
I already implemented something like that, but it is not yet finished ...
Some few hours, and it should go.
Sebastian.
More information about the Gcc
mailing list