[Xcb] _Problems_ in GSoC, 2011

Josh Triplett josh at joshtriplett.org
Mon Jun 20 11:36:24 PDT 2011


On Fri, Jun 17, 2011 at 06:51:37PM +0530, vikash agrawal wrote:
> So far I have understood the code generation, Now I want to test it, so how
> do I do it?
> Also if I add this
> 
>  <!-- This are for testing purpose -->
>   <enum name="Test">
>       <item name="Test" />
>       <item name="Reteset" />
>   </enum>
> 
> to any of protocol then will it compile to give outputs? because I tried but
> it didnt. So how do I test if I am going correct in understanding the code
> generation.

That seems like a nice test to start with.  You should start by making
sure that the libxcb build finds your modified proto files; it may only
look at the system-wide files.  Try configuring your modified proto with
"./configure --prefix=/tmp/xcbtest", doing "make install" on it, then
configuring libxcb with "PKG_CONFIG_PATH=/tmp/xcbtest/lib/pkgconfig
./configure --prefix=/tmp/xcbtest/" so it uses the modified proto.  If
all goes well, during the build process you should see lines like this:

/usr/bin/python ./c_client.py -p /tmp/xcbtest/lib/python2.6/site-packages /tmp/xcbtest/share/xcb/xproto.xml

Actually, you can probably run commands like that directly.

> And should I move to xkb or xproto now?

I'd suggest first running more tests along the lines of what you did
above.  Once you see the generated code for your <enum> test, try
building a <struct> to see what that produces.  In particular, try
putting simple fields with various sizes (CARD8, CARD16, CARD32) next to
each other and see when you end up with generated padding.  That should
help you understand the padding rules.

> [ Am I going very slow? Please speak to me bluntly as this is very
> important, with context to deadlines, work and assessments ( less than 20
> days left ) as I really want to know and would pace up more to give my best,
> By now almost 3 weeks are coming to an end and I feel very unsatisfied with
> my work, though still I am not sure, if I am judging my self very brutally
> or sympathetically]

See my previous reply regarding this.  In short, please don't worry too
much about the deadline; focus on learning about the code generation
through experiments, understanding the padding bug, and figuring out how
to implement the padding rules.  Remember, you have a large, complex,
and unfamiliar codebase to work with here; you will absolutely need time
to understand it.  Don't worry about having to do experiments to learn,
and don't worry that you haven't already produced useful code.  This
part of the process will feel a bit unproductive until you realize how
much information you've had to learn so that you could start writing
code.  Experiments and learning count as productive work, as long as you
go on to use that knowledge later in the process. :)

- Josh Triplett


More information about the Xcb mailing list