This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Example of the gcc internals described in rdf/ntriples via the gcc-introspector
- From: James Michael DuPont <mdupont777 at yahoo dot com>
- To: gcc at gnu dot org
- Date: Mon, 20 Jan 2003 02:17:11 -0800 (PST)
- Subject: Example of the gcc internals described in rdf/ntriples via the gcc-introspector
Dear fellow hackers,
I have produced a mutation of the debian source package that contains
the rdf dump of cppdefault.c in rdf/ntriples format.
The idea is to create signed debian packages that contain the meta-data
about a package in a standard form. The dpkg system will be very good
for this purpose. As it contains methods for the automatic compilation.
Currently I am planning an extension to apt-src to download, compile
with the gcc-introspector and store the resulting meta-data as a
derived source package. That way we can also use the standard packaging
systems to get at the data if needed, and to have people vouch for the
validity.
http://introspector.sourceforge.net/debian/incoming/gcc-3.2-cppdefault_0.1-1_source.changes
http://introspector.sourceforge.net/debian/incoming/gcc-3.2-cppdefault_0.1.orig.tar.gz
You can view also the data online :
http://introspector.sourceforge.net/2003/01/19/cppdefault.i/
Here is the expanded source code that was fed to the introspector :
based on the gcc.3.2 cvs
http://introspector.sourceforge.net/2003/01/19/cppdefault.i/cppdefault.i
Not that this does not contain much of the gcc, and serves only a
simple example.
You will find a gzip of the global rdfs :
http://introspector.sourceforge.net/2003/01/19/cppdefault.i/_global__.tu_.ntriples.gz
you can see how the ntriples format is easy
to process, for example if you want to extract all the ids that are
like "ix86", you can just grep and cut
$ grep \#strg _global__.tu_.ntriples | cut -d\" -f2 | sort -u | grep
ix8
ix86_align_funcs_string
ix86_align_jumps_string
ix86_align_loops_string
ix86_arch
ix86_arch_string
ix86_args
ix86_asm_dialect
ix86_asm_string
ix86_branch_cost
ix86_branch_cost_string
ix86_builtins
ix86_cmodel
ix86_cmodel_string
ix86_compare_op0
ix86_compare_op1
ix86_cost
ix86_cpu
ix86_cpu_string
ix86_debug_addr_string
ix86_debug_arg_string
ix86_fpmath
ix86_fpmath_string
ix86_preferred_stack_boundary
ix86_preferred_stack_boundary_string
ix86_regparm
ix86_regparm_string
ix86_tls_dialect
ix86_tls_dialect_string
Thanks to Mark Mitchell and all the gcc hackers for the fine
dump-translation-unit apon which this is based.
mike
=====
James Michael DuPont
http://introspector.sourceforge.net/
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com