[RFC wayland v2 0/2] Wayland protocol dumper

Bryce Harrington bryce at osg.samsung.com
Fri Jul 25 11:31:43 PDT 2014


On Fri, Jul 25, 2014 at 09:21:36AM +0800, Boyan Ding wrote:
> Hi,
> On Thu, 2014-07-24 at 18:01 -0700, Bryce Harrington wrote:
> > Hmm, do I understand the directions correctly?
> > 
> > In one terminal after building and installing the patched wayland, I've
> > run:
> > 
> >   $ ./wayland-tracer -S wayland-0
> > 
> > Then in another terminal window, I rebuild weston and:
> > 
> >   $ WAYLAND_DISPLAY=wayland-0 ~/Wayland/weston/weston-flower
> >   failed to connect to Wayland display: No such file or directory
> >   failed to create display: No such file or directory
> >   $
> > 
> Oh, you should have a compositor first. This tool is only used to
> redirecting data on the wire.
> 
> Suppose you have a compositor which runs on wayland-0. You can run
> (Supposed environment variable WAYLAND_DISPLAY=wayland-0)
> $ ./wayland-tracer -S wayland-1
> 
> Then if you run under another terminal
> $ WAYLAND_DISPLAY=wayland-1 weston-flower
> 
> You'll see weston-flower and in the compositor and the communication
> dumped.

Aha, that did the trick.

$ ./wayland-tracer -S wayland-1
0: <= Data dumped: 12 bytes:
01 00 00 00 01 00 0c 00 02 00 00 00 

0: => Data dumped: 624 bytes:
02 00 00 00 00 00 20 00 01 00 00 00 0b 00 00 00 77 6c 5f 64 69 73 70 6c
61 79 00 00 01 00 00 00 02 00 00 00 00 00 24 00 02 00 00 00 0e 00 00 00
77 6c 5f 63 6f 6d 70 6f 73 69 74 6f 72 00 00 00 03 00 00 00 02 00 00 00
00 00 28 00 03 00 00 00 11 00 00 00 77 6c 5f 73 75 62 63 6f 6d 70 6f 73
69 74 6f 72 00 00 00 00 01 00 00 00 02 00 00 00 00 00 20 00 04 00 00 00
0a 00 00 00 77 6c 5f 73 63 61 6c 65 72 00 6f 73 02 00 00 00 02 00 00 00
00 00 2c 00 05 00 00 00 16 00 00 00 77 6c 5f 74 65 78 74 5f 69 6e 70 75
74 5f 6d 61 6e 61 67 65 72 00 00 00 01 00 00 00 02 00 00 00 00 00 2c 00
06 00 00 00 17 00 00 00 77 6c 5f 64 61 74 61 5f 64 65 76 69 63 65 5f 6d
61 6e 61 67 65 72 00 00 01 00 00 00 02 00 00 00 00 00 1c 00 07 00 00 00
07 00 00 00 77 6c 5f 73 68 6d 00 65 01 00 00 00 02 00 00 00 00 00 1c 00
...

Guess my testing of this isn't useful, but I'll look forward to
following your progress on this.  Let me know when you have your own
project tree set up.

Bryce

> > > To make it run under default mode (now called "single mode"), run
> > > shell> wayland-tracer -- program arguments ...
> > 
> > Not sure what this mode is, but it seems not to do much for me:
> > 
> >   $ ./wayland-tracer -- ~/Wayland/weston/weston-flower
> >   0: <= Data dumped: 12 bytes:
> >   01 00 00 00 01 00 0c 00 02 00 00 00 
> You also got to have a running compositor. But this reminds me to check
> whether the connection is successful.
> 
> Cheers,
> Boyan Ding
> 
> 
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel


More information about the wayland-devel mailing list