Hi Tholom,
> Would anyone care to comment on using the 'stabs' emitted
> by 'gcc -S ...' as an alternative to parsing .c or .h files to
> get info on structs (and global variables as well) for use
> by Inline/Inline::Struct?
>
> Tom C.'s c2ph does this for structs, and it seems to be a
> fool-proof approach, so long as you don't need #define info
> or can get it otherwise.
You're right, this is an ideal solution -- but it relies on external
tools. If Inline is to be useful to people in Windows, it can't rely on
UNIX tools like gcc. And although MS' compiler generates debugging
information, it's not in the same format.
Parse::RecDescent, while less foolproof, is written in pure Perl, which
means it runs anywhere Inline is likely to be used. That's a big plus.
> I'm interested in dragging a C library (actually, a large
> program with the main() omitted) lock, stock and barrel into
> perl so I can tinker with the internals, and replace the
> program's awful GUI quickly via Tk or somesuch.
This is possible with Inline. Check out Inline::C and Inline::C-Cookbook
for more information, give it a try with a few simple examples, and feel
free to email the list with your results along the way.
> Also, it'd be nice to control regression tests via perl rather
> than C.
I assume this is possible. I have never controlled a regression test, and
probably wouldn't know one if it introduced itself. :)
> Was the stabs approach ever considered/discarded/laughed off stage for
> Inline and its ::kiddies?
It was never laughed offstage; it didn't get past second-round auditions.
Later,
Neil