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, martin at loewis dot home dot cs dot tu-berlin dot de
- Subject: RE: Using the tree.
- From: Mike Stump <mrs at windriver dot com>
- Date: Tue, 30 May 2000 14:20:16 -0700 (PDT)
- Cc: gcc at gcc dot gnu dot org
> From: "Virgil Palanciuc" <Virgil.Palanciuc@cs.pub.ro>
> To: "Martin v. Loewis" <martin@loewis.home.cs.tu-berlin.de>
> Cc: <gcc@gcc.gnu.org>
> Date: Sun, 28 May 2000 21:00:52 +0300
> Anyway, there must be a way to find out what stack slot is
> assigned to each variable (and to find out this info about arrays,
> too !!! ). Ultimately, this information can be obtained in the
> parsing step and memorised in a different data structure until
> needed. This is an ugly yet safe solution - but I don't know how
> (and *exactly* when) to do that, either.
We expect that you'll do some digging. The answer is roughly
DECL_RTL. The next question becomes how can I find the decls. That
answer then becomes getdecls. The next question is when to call it.
The answer to that is at the end of each binding contour. The next
question is when does a binding contour end, the answer to that is
pop_binding_level. ... You get the idea. All these are simple
answers and aren't necessarily complete or accurate, but they should
get you looking at the right code and on the right track. Once you
get into the code in the debugger, and start playing around, it will
become familiar and predictable. You can then ask more interesting
questions with more interesting answers... I am sure that you can ask
hundreds of questions with little thought. That will swamp our desire
to answer in general. If you play around a bit before asking them, we
hope that you will be able to answer your own questions before we have
to. If you fail to do this, some that could answer may just ignore
all your questions.