[Rock-dev] gccxml -> clang

Sylvain Joyeux bir.sylvain at gmail.com
Mon Jun 30 17:25:05 CEST 2014


On Mon, Jun 30, 2014 at 10:01 AM, Matthias Goldhoorn <
matthias.goldhoorn at dfki.de> wrote:

>  1. orogen calls the gccxml and forwards it to the typelib
>
Nope. orogen calls typelib to import a C/C++ file using Registry#import and
typelib does the importing using gccxml. From the p.o.v. of orogen, gccxml
does not exist.


> 2. typelib creates the structure and tlb's
>
Correct. The gccxml output is parsed by typelib's gccxml importer to create
a typelib registry. This is what is returned to orogen.

what i don't understand, the gccxml output is only kind of "preprocessor"
> output.
>
The gccxml output contains the whole information. The gccxml importer
extracts only what typelib will need (throws away all the method/function
information). This is in big part why the import is so damn slow, a gccxml
output can be very easily multi-MB of XML while we need maybe 1% of it.


> How are the padding/sizes/alignments are created or calculated, where is
> this part?
> I only found this in orogen lib/orogen/gen/typekit.rb:1406. But i have no
> clue how the typeinfos are gathered.
>
The padding / alignment / sizes should NOT be calculated, but provided by
the compiler. I was doing it once upon a time, but that's really really
fragile to do right.

By the way, with clang the whole process should be done within typelib in
C++. No need to pass through Ruby.

Sylvain
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20140630/31ea56bb/attachment.htm 


More information about the Rock-dev mailing list