Show binary path as part of debug info
[babeltrace.git] / include / babeltrace / trace-debuginfo.h
index 963ec97fb45ff6789199422746fc283e60742fba..cf4069a228496245575bbabb6936d0ffdac5c41e 100644 (file)
@@ -46,7 +46,8 @@ void ctf_text_integer_write_debug_info(struct bt_stream_pos *ppos,
 
        /* Print debug info if available */
        if (debug_info_src) {
-               if (debug_info_src->func || debug_info_src->filename) {
+               if (debug_info_src->func || debug_info_src->src_path ||
+                               debug_info_src->bin_path) {
                        bool add_comma = false;
 
                        fprintf(pos->fp, ", debug_info = { ");
@@ -57,7 +58,7 @@ void ctf_text_integer_write_debug_info(struct bt_stream_pos *ppos,
                                add_comma = true;
                        }
 
-                       if (debug_info_src->filename) {
+                       if (debug_info_src->src_path) {
                                if (add_comma) {
                                        fprintf(pos->fp, ", ");
                                }
@@ -65,11 +66,22 @@ void ctf_text_integer_write_debug_info(struct bt_stream_pos *ppos,
                                fprintf(pos->fp, "src = \"%s:%" PRIu64
                                                "\"",
                                                opt_debug_info_full_path ?
-                                               debug_info_src->filename :
-                                               debug_info_src->short_filename,
+                                               debug_info_src->src_path :
+                                               debug_info_src->short_src_path,
                                                debug_info_src->line_no);
                        }
 
+                       if (debug_info_src->bin_path) {
+                               if (add_comma) {
+                                       fprintf(pos->fp, ", ");
+                               }
+
+                               fprintf(pos->fp, "bin = \"%s\"",
+                                               opt_debug_info_full_path ?
+                                               debug_info_src->bin_path :
+                                               debug_info_src->short_bin_path);
+                       }
+
                        fprintf(pos->fp, " }");
                }
        }
This page took 0.023331 seconds and 4 git commands to generate.