This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
source code database
- From: Mathieu Lacage <Mathieu dot Lacage at sophia dot inria dot fr>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 04 Nov 2003 15:24:42 +0100
- Subject: source code database
- Organization: INRIA
hi,
A bit of googling showed that the topic of dumping internal compiler
information into a database is pretty controvertial. I personally do not
wish to get into a flamewar but I would like to work on a GPL tool
similar to http://www.westernwares.com/ (there are other proprietary
products with similar functionality but this one has one of the best
descriptions available I could find).
It is obvious that using something similar to the "gcc introspector"
would provide enough information to be able to build such an application
but reading the archives shows that it is rather unlikely such a patch
can ever be applied to the gcc source tree.
As such, I am currently looking into trying to figure out what kind of
information would be "just enough" to build the application I want. I am
not sure if it is even possible to use less data or if this "less data"
will be unusable as a code-generation starting point but I would like to
know:
- if I can provide a patch which generates an enough-detailed dump for
my application and not-enough detailed for a code generator, would it be
at least considered for inclusion in the main source tree ? Or would
that be considered too dangerous because people might be able to extend
it too easily ?
- is there anyone here who is more experienced than me and who could
help me figure out if what I want can be done. As an example, consider
this piece of C++ code:
if (foo.GetData ())
Imagine the user clicks in his IDE view on the foo string. I want to
figure out what this string is: variable ? macro ? If variable, its type
? If macro, what does the preprocessor transform it into given the
compiler's command-line arguments ?
The hard part here is associating the "foo" string with something which
represents the high-level langage object: I do not want to use
heuristics to answer this question. Getting information on the language
object itself once I have it can be done relatively easily with the
dwarf2 debugging information but I need to know what this object is to
first look it up.
I am open to _any_ suggestion :)
regards,
Mathieu
--
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>