public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jim Wilson <wilson@specifixinc.com>
To: Andrew <gpl@km.ru>
Cc: gcc@gcc.gnu.org
Subject: Re: gcc help
Date: Thu, 22 Jan 2004 22:06:00 -0000	[thread overview]
Message-ID: <4010442C.2020507@specifixinc.com> (raw)
In-Reply-To: <400F7316.000097.06756@e-post02.e-se.ru>

Andrew wrote:
> I need to add a special code to your GCC program. This code gatheres information about all variables (their names, ranges and name spaces which they belong to) and opetators (which use those variables), and insert all this information to a database.
> Could you please point me the best place it can be done.

There is no easy answer to this question.  There is no easy place to get 
all of the info you want.  The info is in different places in different 
front ends and in different gcc versions.  You will have to spend quite 
a bit of time looking at gcc sources in order to be successful at 
modifying it.

Getting variable declarations isn't too hard.  They all have to do into 
the symbol table anyways, so the symbol represents a single place you 
can look for the info.  See for instance pushdecl in the C front end. 
Pretty much every variable declaration goes through this.  See also 
pushlevel and poplevel.  These maintain the BLOCK trees that hold the 
scoping info for variables.

The other of this, keeping track of operators, is much harder.  I don't 
think there is any single place you can hook in with current gcc for 
this info.  Maybe on the tree-ssa branch it is better.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com

  reply	other threads:[~2004-01-22 21:44 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-22  8:22 Andrew
2004-01-22 22:06 ` Jim Wilson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-05-18 18:11 packet
2010-05-18 18:18 ` Joel Sherrill
2005-11-30 22:40 pati (sent by Nabble.com)
2005-11-30 23:04 ` Mike Stump
2005-03-29 17:54 Gcc help andre
2005-03-29 18:10 ` andre
2005-03-29 19:02 ` Eljay Love-Jensen
2005-03-29 19:15   ` Eljay Love-Jensen
2004-09-09  9:53 GCC help Sonawane Sachin Vijayku
2004-09-09 10:08 ` Sonawane Sachin Vijayku
2004-09-09 10:25 ` Ranjit Mathew
2004-09-09 10:37 ` Nathan Sidwell
2004-09-09 10:40   ` Nathan Sidwell
2003-12-03 17:48 George Ciobanu
2003-12-04 20:10 ` Jim Wilson
2002-10-25 16:21 gcc help MICHAEL GOODWIN
2002-02-19  5:32 GCC help aditya nishandar
2002-02-19  8:12 ` Philipp Thomas
     [not found] <616BE6A276E3714788D2AC35C40CD18D29DB3D@whale.softwire.co.uk>
2001-12-18 23:44 ` gcc help Rupert Wood
2001-12-18 12:16 ashish  kamble
2001-10-14 22:12 GCC help pradeep kumar mishra
2001-10-15  4:49 ` Erik Mouw
2000-07-21 14:42 Gcc Help Anjul Srivastava
2000-07-21 14:35 Koaps
2000-07-21 14:49 ` Alexandre Oliva
2000-06-13 14:09 GCC Help Amir Elaguizy
2000-06-13 14:15 ` llewelly
2000-06-13 14:16 ` Mo McKinlay
2000-06-13 14:37 ` Alexandre Oliva
1998-12-15 10:18 Eric Methot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4010442C.2020507@specifixinc.com \
    --to=wilson@specifixinc.com \
    --cc=gcc@gcc.gnu.org \
    --cc=gpl@km.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).