X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=ebc6d0e8d2023010e4807b8e2833148f47f7c14f;hb=05984e0cf2b0b9e63e72d601ec4941f7f2a5c13d;hp=3f56a729036b568d070b8fc407569c44c5518f1c;hpb=a0960c1c1b8248d7684f96736773a1b4aba80766;p=babeltrace.git diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 3f56a729..ebc6d0e8 100644 --- a/formats/ctf/ctf.c +++ b/formats/ctf/ctf.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -84,6 +85,7 @@ int64_t opt_clock_offset; int64_t opt_clock_offset_ns; extern int yydebug; +char *opt_debug_info_dir; /* * TODO: babeltrace_ctf_console_output ensures that we only print @@ -2413,8 +2415,14 @@ struct bt_trace_descriptor *ctf_open_trace(const char *path, int flags, goto error; } + ret = trace_debug_info_create(td); + if (ret) { + goto error; + } + return &td->parent; error: + trace_debug_info_destroy(td); g_free(td); return NULL; } @@ -2583,6 +2591,11 @@ struct bt_trace_descriptor *ctf_open_mmap_trace( if (ret) goto error_free; + ret = trace_debug_info_create(td); + if (ret) { + goto error_free; + } + return &td->parent; error_free: @@ -2734,6 +2747,7 @@ int ctf_close_trace(struct bt_trace_descriptor *tdp) } } free(td->metadata_string); + trace_debug_info_destroy(td); g_free(td); return 0; }