This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Using the tree.


>      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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]