X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=formats%2Fctf%2Fctf.c;h=c87da63d7e8821bac70a78097304907c67423e7c;hb=5cde0dc17329ae1e86b4cfb82dd23e25d69c2d26;hp=730566653276551145d2aa585282684dac03aa27;hpb=7da9b2f355093d2bd1a91e9779adb87f783f872a;p=babeltrace.git diff --git a/formats/ctf/ctf.c b/formats/ctf/ctf.c index 73056665..c87da63d 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,8 @@ int64_t opt_clock_offset; int64_t opt_clock_offset_ns; extern int yydebug; +char *opt_debug_info_dir; +char *opt_debug_info_target_prefix; /* * TODO: babeltrace_ctf_console_output ensures that we only print @@ -386,7 +389,7 @@ void ctf_print_timestamp_real(FILE *fp, time_t time_s = (time_t) ts_sec_abs; if (is_negative) { - fprintf(stderr, "[warning] Fallback to [sec.ns] for printing negative time value. Use --clock-seconds.\n"); + fprintf(stderr, "[warning] Fallback to [sec.ns] to print negative time value. Use --clock-seconds.\n"); goto seconds; } @@ -2413,8 +2416,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 +2592,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 +2748,7 @@ int ctf_close_trace(struct bt_trace_descriptor *tdp) } } free(td->metadata_string); + trace_debug_info_destroy(td); g_free(td); return 0; }