[RFC wayland 0/2] Wayland protocol dumper

Boyan Ding stu_dby at 126.com
Sat Jul 19 19:18:01 PDT 2014


The idea of wayland protocol dumper came from [1]. And this patch
series implements a prototype of it. I found wayland utilities quite
convenient so I decided to base my work on top of wayland (although
not using libwayland-client or libwayland-server), so it temporarily
(and I hope eventually it can) resides in the wayland source tree.

The program is quite simple now, it uses a socketpair to communicate
with a client and redirect that to the server, dumping the data on the
wire in the process. It only dumps raw data at present.

To use it, you can try:
shell> wayland-tracer [program you want to trace and arguments]

It can be really easy to cut down the data to single messages, though,
producing readable outputs about messages (names and argument values)
is quite far ahead. My plan is to take .xml protocol files as input
and learn things on the fly. I think it possible although I'm not very
sure about details.

Comments and suggestions are welcomed. Feel free to say something about
whether it useful, where it is wrong, how it can improve, etc.

Regards,
Boyan Ding

[1] http://lists.freedesktop.org/archives/wayland-devel/2014-April/014121.html

Boyan Ding (2):
  connection: Move some definitions
  Add a wayland protocol dumper wayland-tracer

 .gitignore            |   1 +
 Makefile.am           |  10 ++
 configure.ac          |   7 +
 src/connection.c      |  18 +--
 src/tracer.c          | 351 ++++++++++++++++++++++++++++++++++++++++++++++++++
 src/wayland-private.h |  18 ++-
 6 files changed, 389 insertions(+), 16 deletions(-)
 create mode 100644 src/tracer.c

-- 
2.0.1




More information about the wayland-devel mailing list