<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hi,</div><div class=""><br class=""></div><div class="">I’m trying to use the babeltrace library to be able to load and read a CTF trace in a C program.</div><div class=""><br class=""></div><div class="">From the doc:</div><div class=""><br class=""><blockquote type="cite" class="">In order to use libbabeltrace to read a trace, the first step is to create a<br class="">context structure and to add a trace to it. This is done using the<br class="">bt_context_create() and bt_context_add_trace() functions. As long as this<br class="">context structure is allocated and the trace is valid, the trace can be<br class="">manipulated by the library.</blockquote></div><div class=""><br class=""></div><div class="">But for a simple program like this:</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">#include <stdio.h><br class="">#include <babeltrace/context.h><br class=""><br class="">int main(void){<br class=""><br class="">    struct bt_context *ctx = bt_context_create();<br class="">    <br class="">    int ret = bt_context_add_trace(ctx, "/home/alex/trace/ffmpeg/kernel/", "ctf", NULL, NULL, NULL);<br class=""><br class="">    return ret;</blockquote><blockquote type="cite" class=""><br class=""></blockquote><blockquote type="cite" class="">}<br class=""></blockquote></div><div class=""><br class=""></div><div class="">I got the following error message:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; line-height: normal;" class=""><blockquote type="cite" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">[error] [Context] Format "ctf" unknown.</span></blockquote></div></div><div class=""><br class=""></div><div class="">and ret = -1.</div><div class=""><br class=""></div><div class="">The trace is a valide CTF trace that I can read using the babeltrace program.</div><div class=""><br class=""></div><div class=""><div class="">I’m running a Debian with linux kernel 4.3</div></div><div class="">I compiled babeltrace from the git (branch master) earlier today, the babeltrace binary reports a version number : 2.0.0-pre</div><div class="">This behavior is the same if I use the Debian packages of the 1.3.1 version.</div><div class=""><br class=""></div><div class="">How can I solve this ?</div><div class="">Thanks,</div><div class=""><br class=""></div><div class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">—<br class="">Alexis Martin<br class="">PhD. Student</div><div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">INRIA / LIG POLARIS-Team</div></div></div></div></div>
</div>
<br class=""></body></html>