[lttng-dev] Names collisions with LTTng-UST

Simon Marchi simon.marchi at polymtl.ca
Thu Aug 1 09:59:19 EDT 2013


That sounds good, I'll try that. Thanks !

On 1 August 2013 00:34, Zifei Tong <soariez at gmail.com> wrote:
> Hi,
>
> On Thu, Aug 1, 2013 at 2:29 AM, 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?
>>
>> 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



More information about the lttng-dev mailing list