This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Using the tree.
- To: Virgil dot Palanciuc at cs dot pub dot ro
- Subject: Re: Using the tree.
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Sat, 27 May 2000 20:06:44 +0200
- CC: gcc at gcc dot gnu dot org
- References: <NDBBLMFNNKHMOCBKELIEIEMNCBAA.Virgil.Palanciuc@cs.pub.ro>
> I am trying to obtain all the variables declared in a function using
> (to build a 'memory map'). I don't think I can find what I want from the
> RTL - I tried that (I can't find arrays declared in a function).
> I do something like:
>
> for(tmp=getdecls();tmp;TREE_CHAIN(tmp))
> debug_tree(tmp);
>
> I looked through the output and I can't find any rel;evant information
> (there doesn't seem to be anything in the output related to my variables -
> only my function's name and a LOT of builtins).
>
> What should I do get the information I need?
What front-end is this for? I don't think all front-ends support such
a function. In the C++ front-end, due to the function-at-once mode, it
should be possible to walk the tree and find all var_decls.
Regards,
Martin