dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[DotGNU]Introspector Update


From: James Michael DuPont
Subject: [DotGNU]Introspector Update
Date: Sat, 6 Apr 2002 05:04:14 -0800 (PST)

Dear Gopal, And Rhys.

It was nice to chat with you online, I will try and
find more time to do that more often. 

A tgz of the runnable version of the introspector is
ready for you.
It just contains the bit of code to decode the xml
from the compiler and binary version that should run
on your computer, I compiled it under debian, but it
should run on all linuxes with perl.

The files 
Database/queries.pm 
and 
ParseGCCXML.pm have been updated to not
write to the database,
they just gz the xml and sql into the xml
subdirectory. 
If you want to use the database, 
just overwrite them from cvs.

FILENAME :introspector_simple.tgz
MD5     :d439e3372c1f788c40f49ed4bb473caf 

http://prdownloads.sourceforge.net/introspector/introspector_simple.tgz

A cleaner installation and usage will be worked on.

What do you think of connecting of  of the gcc
treenodes and the pnet via the database.

We can read in the pnet tree nodes into the database
via the introspector and connect them directly via an
translation table!

You would have a translation table that 
looks like following:
To translate between to types :

TranslateType(
              gcc_type,
              pnet_type,
              comments,
              typeoftranslation 
              )
The type of tranlation would be
1-1, 
1-m,n-1,
n-n
if there is no translation, a null would be used.

and example would be :
TranslateType(CALL_EXPR,
              ILNode_InvokationExpression,
              "The invocation of a function",
               ONE_TO_ONE)

Of course we would use the database id of
the node, not the name.

To show how thefields map onto each other :
TranslateField(
               gcc-field,
               pnet-field,
               comments,
               typeoftranslation)

To attach any comment to a node :
CommentNode(NodeID,user,comment)

Another thing, 
in order to use the cc1, you will have to preprocess
the code first. I use gcc -v to get the ccp command
line :

/usr/lib/gcc-lib/i386-linux/2.95.2/cpp -lang-c -v
-D__GNUC__=2 -D__GNUC_MINOR__=95 -D__ELF__ -Dunix
-D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__
-D__linux__ -D__unix -D__linux -Asystem(posix)
-Acpu(i386) -Amachine(i386) -Di386 -D__i386 -D__i386__
test.c /tmp/cc9rELuO.i

Then you have to remove the -A commands that dont
work.

/usr/lib/gcc-lib/i386-linux/2.95.2/cpp -lang-c -v
-D__GNUC__=2 -D__GNUC_MINOR__=95 -D__ELF__ -Dunix
-D__i386__ -Dlinux -Di386 -D__i386 -D__i386__ test.c
test.i

That will give you a test.i that you can pass to the
compiler.
./cc1 ./test.i

The introspector will put each function into its own
file, the globals are for the global definitions.

mike

=====
James Michael DuPont

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/


reply via email to

[Prev in Thread] Current Thread [Next in Thread]