[lttng-dev] Names collisions with LTTng-UST

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue Aug 6 21:17:37 EDT 2013


* Simon Marchi (simon.marchi at polymtl.ca) 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?

Changing "struct tracepoint" would break tracepoint.h API. E.g. an
application doing

sizeof(struct tracepoint)

might start to fail if we change this.

I'm _very_, _very_ reluctant about changing the API, even though this is
not a part of the API that we expect applications to explicitly use.

Also, I think it might be an issue for debugging information if we
change the structure name.

The easiest way would be to work-around this locally in gdb.

Arguably, we should have called this struct lttng_tracepoint from the
beginning, but now is too late.

Thanks,

Mathieu

> 
> Thanks
> 
> Simon
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list