On Tue, 2011-10-25 at 23:21 +0300, Alek Paunov wrote:
Hi,
Regarding various possible use-cases, Is it currently possible to
emulate/enhance gcc-xml export using a plugin script?
I'm not familiar with the
insides of gcc-xml, but I'd hope that it would
be possible to emulate it using a Python script for this plugin.
I'd tried, if the data is accessible.
If you're willing to try implementing this, let the list know. I
suspect you may run into parts of gcc that aren't wrapped yet, but it's
generally been fairly easy to add the necessary hooks to the plugin.
Thank you,
Alek
P.S. Perhaps, it is worth to replicate this plugin too (I love sqlite :-)):
http://code.google.com/p/gccsymdb/
That one looks very replicatable as well. It's very easy to use sqlite
from Python.
One issue you may run into with both of the above is that I've only
implemented a small subset of the possible callback events, and
gcc.register_callback() can fail with:
ValueError: event type 42 invalid (or not wired up yet)
This error comes from gcc-python.c's gcc_python_register_callback().
You can fix it by adding a new case to the switch statement in that
function (the exact arguments for each callback seem to vary a little
between the event types).
Hope this is helpful
Dave