[lttng-dev] decoding tracef msg string via babeltrace API

Milian Wolff milian.wolff at kdab.com
Tue Apr 9 04:36:44 EDT 2019


On Thursday, April 4, 2019 8:25:51 PM CEST Jérémie Galarneau wrote:
> Hi Milian,
> 
> I have pushed a fix [1] in the stable-1.5 branch that addresses the
> issue you have encountered with using bt_ctf_get_field_list().
> This makes it possible to consume a character sequence's content.
> 
> The commit message contains an example to show how to essentially
> perform what the 'ctf-text' format plug-in achieves by accessing the
> internal string field.
> 
> Let me know if that works for you and I'll release an updated version
> of the 1.5 branch.

Thank you, I'll try that out in the next days!

But: why can't we make bt_ctf_get_string return the string for us? Why do we 
need to reinvent the wheel in consumers of the babeltrace API? You point out 
that it's non-trivial to get the strings decoded properly, so I'd really 
appreciate if we get that code implemented once and then can leverage it 
everywhere.

Generally, I don't understand why there's both, bt_ctf_get_string and 
bt_ctf_get_char_array in the first place....

Cheers

-- 
Milian Wolff | milian.wolff at kdab.com | Senior Software Engineer
KDAB (Deutschland) GmbH, a KDAB Group company
Tel: +49-30-521325470
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3826 bytes
Desc: not available
URL: <https://lists.lttng.org/pipermail/lttng-dev/attachments/20190409/293f6bf2/attachment.bin>


More information about the lttng-dev mailing list