This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Access to symbol table from within a program
- From: Sebastian Pop <m1sp at csc dot liv dot ac dot uk>
- To: linguist-gcc at rich-paul dot net
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 25 Jan 2002 12:59:27 +0000
- Subject: Re: Access to symbol table from within a program
- References: <20020124152204.A3618@monster.rich-paul.net>
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.