Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [lttng-dev] Unable to include files in tracepoint provider header files
@ 2015-04-28 18:13 Chidhu R
  2015-04-28 18:27 ` Mathieu Desnoyers
  0 siblings, 1 reply; 3+ messages in thread
From: Chidhu R @ 2015-04-28 18:13 UTC (permalink / raw)


Hello,

In the example (hello) provided, I tried to print complex data types
instead of usual ints or floats. My header file looks like this.

#undef TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER hello_world

#undef TRACEPOINT_INCLUDE
#define TRACEPOINT_INCLUDE "./hello-tp.h"

#if !defined(HELLO_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
#define HELLO_TP_H

#include <lttng/tracepoint.h>

#include "myinc.h"

TRACEPOINT_EVENT(
    hello_world,
    my_first_tracepoint,
    TP_ARGS(
        const char*, my_string_arg
    ),
    TP_FIELDS(
        ctf_integer(int, my_string_field, atoi(my_string_arg))
    )
)

My include file looks like this (myinc.h)
typedef unsigned char uuid_t;

However, when I try to compile it using, lttng-gen-tp, I am getting the
following error.

root at mvm236:~/heelo_prog# lttng-gen-tp hello-tp.tp
In file included from ././hello-tp.h:13:0,
                 from /usr/include/lttng/ust-tracepoint-event.h:740,
                 from /usr/include/lttng/tracepoint-event.h:58,
                 from hello-tp.h:56,
                 from hello-tp.c:7:
././myinc.h:1:1: error: expected expression before ?typedef?

Whatever I try to include, I am getting this error.

Can you please help.

-- Chid
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lttng.org/pipermail/lttng-dev/attachments/20150428/475e87f9/attachment.html>


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-28 18:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-28 18:13 [lttng-dev] Unable to include files in tracepoint provider header files Chidhu R
2015-04-28 18:27 ` Mathieu Desnoyers
2015-04-28 18:33   ` Chidhu R

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox