On Thu, 24 Aug 2017 16:16:17 +0200
Maniraj Devadoss <[email protected]> wrote:

> A tool for accessing the zcompositor_debug_v1 interface features.
> 
> Installed along weston-info, because it should be potentially useful for
> people running libweston-based compositors.
> 
> Signed-off-by: Pekka Paalanen <[email protected]>
> 
> Added a man page for weston-debug client
> 
> Signed-off-by: Maniraj Devadoss <[email protected]>

Hi,

very good.

> ---
>  Makefile.am            |  11 +-
>  clients/weston-debug.c | 378 
> +++++++++++++++++++++++++++++++++++++++++++++++++
>  man/weston-debug.man   |  46 ++++++
>  3 files changed, 434 insertions(+), 1 deletion(-)
>  create mode 100644 clients/weston-debug.c
>  create mode 100644 man/weston-debug.man
> 
> diff --git a/Makefile.am b/Makefile.am
> index 61fe9e8..1123c63 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -529,7 +529,7 @@ spring_tool_SOURCES =                             \
>  
>  if BUILD_CLIENTS
>  
> -bin_PROGRAMS += weston-terminal weston-info
> +bin_PROGRAMS += weston-terminal weston-info weston-debug
>  
>  libexec_PROGRAMS +=                          \
>       weston-desktop-shell                    \
> @@ -842,6 +842,15 @@ nodist_weston_info_SOURCES =                             
> \
>  weston_info_LDADD = $(WESTON_INFO_LIBS) libshared.la
>  weston_info_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
>  
> +weston_debug_SOURCES =                                       \
> +     clients/weston-debug.c                          \
> +     shared/helpers.h
> +nodist_weston_debug_SOURCES =                                \
> +     protocol/compositor-debug-unstable-v1-protocol.c        \
> +     protocol/compositor-debug-unstable-v1-client-protocol.h
> +weston_debug_LDADD = $(WESTON_INFO_LIBS) libshared.la
> +weston_debug_CFLAGS = $(AM_CFLAGS) $(CLIENT_CFLAGS)
> +
>  weston_desktop_shell_SOURCES =                               \
>       clients/desktop-shell.c                         \
>       shared/helpers.h
> diff --git a/clients/weston-debug.c b/clients/weston-debug.c
> new file mode 100644
> index 0000000..3437d7e
> --- /dev/null
> +++ b/clients/weston-debug.c

Just the necessary renamings in this file, that's good.

> +int
> +main(int argc, char **argv)
> +{
> +     struct debug_app app = { 0 };

/home/pq/git/weston/clients/weston-debug.c: In function ‘main’:
/home/pq/git/weston/clients/weston-debug.c:296:9: warning: missing braces 
around initializer [-Wmissing-braces]
  struct debug_app app = { 0 };

But I wrote that bit. I must have been using a different gcc version.
Changing it to this shouldn't hurt I think:

        struct debug_app app = { };


> diff --git a/man/weston-debug.man b/man/weston-debug.man
> new file mode 100644
> index 0000000..22f1345
> --- /dev/null
> +++ b/man/weston-debug.man
> @@ -0,0 +1,46 @@
> +.TH WESTON-DEBUG 1 "2017-08-02" "Weston __version__"
> +.SH NAME
> +weston-debug \- a tool for getting debug messages from compositor.
> +.SH SYNOPSIS
> +.B weston-debug [options] [names]
> +.
> +.\" ***************************************************************
> +.SH DESCRIPTION
> +
> +.B weston-debug
> +is a debugging tool which uses zcompositor_debug_v1 interface to get the
> +debug messages from the compositor. The debug messages are categorized into 
> different
> +debug streams by the compositor (example: logs, proto, list, etc.,) and the 
> compositor
> +requires a file descriptor to stream the messages.
> +
> +This tool accepts a file name or a file desciptor (not both) and any desired 
> debug stream
> +names from the user as command line arguments and subscribes the desired 
> streams from the
> +compositor by using the zcompositor_debug_v1 interface. After the 
> subscription, the
> +compositor will start to write the debug messages to the shared file 
> descriptor.
> +
> +If no file name or file descriptor argument is given, the tool will use the 
> stdout file
> +descriptor. If no debug stream name argument is given, the tool will use the 
> the name "list"
> +which results the names of all the supported debug streams by the compositor.
> +
> +.
> +.\" ***************************************************************
> +.SH OPTIONS
> +.
> +.B weston-debug
> +accepts the following command line options.
> +.TP
> +. B \-h, \-\-help
> +Print the help text and exit with success.
> +.TP
> +. B \-o FILE, \-\-output FILE
> +Direct output to file named FILE. Use - for stdout.
> +Stdout is the default. Mutually exclusive with -f.
> +.TP
> +. B \-f FD, \-\-outfd FD
> +Direct output to the file descriptor FD.
> +Stdout (1) is the default. Mutually exclusive with -o.
> +.TP
> +.B [names]
> +Names are whatever debug stream names the compositor supports. If none
> +are given, the name "list" is used, to which the compositor should reply
> +with a list of all supported names.

The man-page looks good, but I think you forgot to add it to the build
in Makefile.am.


Thanks,
pq

Attachment: pgpesp8mqnXyl.pgp
Description: OpenPGP digital signature

_______________________________________________
wayland-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to