Hi,

On Thu, Aug 1, 2013 at 2:29 AM, Simon Marchi <[email protected]> wrote:
> Hello tracing bending units,
>
> I encountered a problem while trying to put UST tracepoints in GDB
> today. Since GDB defines a struct tracepoint, it conflicts with
> LTTng's struct tracepoint. Renaming all struct tracepoint in UST to
> struct ust_tracepoint, and rebuilding/installing, provided a simple
> workaround. Would it be possible to do change something in LTTng to
> avoid conflicts like this in the future?
>
> Thanks

gdb used to work around this by the following snippet [1]:

/* UST puts a "struct tracepoint" in the global namespace, which
   conflicts with our tracepoint.  Arguably, being a library, it
   shouldn't take ownership of such a generic name.  We work around it
   here.  */
#define tracepoint ust_tracepoint
#include <ust/ust.h>
#undef tracepoint

I am not sure if it is still working with lttng 2.x API.

[1]: https://github.com/5kg/gdb/blob/master/gdb/gdbserver/tracepoint.c#L6497


Thanks,
Zifei Tong

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Reply via email to