0.12 — gcc-python-plugin 0.16 documentation (original) (raw)

gcc-python-plugin

Changes to the GCC Python Plugin

GCC 4.8 compatibility

This release of the plugin adds support for gcc 4.8 (along with continued support for gcc 4.7 and gcc 4.6).

gcc-c-api

The source tree contains a new component: gcc-c-api. This provides a wrapper library libgcc-c-api.so that hides much of the details of GCC’s internals (such as the binary layout of structures, and the differences between GCC 4.6 through 4.8).

I plan for this to eventually be its own project, aiming at providing a stable API and ABI for working with GCC, once it has proven itself in the context of the python plugin.

The API provides an XML description of itself, which should greatly simplify the job of generating bindings for accessing GCC internals from other languages.

The plugin can now be used with GCC’s Link-Time Optimization feature (LTO), allowing whole-program visualizations and analysis.

For example, you can rendering a whole-program “supergraph” of control flow graphs using this invocation:

$ ./gcc-with-python
examples/show-lto-supergraph.py
-flto
-flto-partition=none
tests/examples/lto/input-*.c

which will render a bitmap of the supergraph like this:

image of a supergraph

Other fixes

Internal improvements to gcc-with-cpychecker