From 7fd3113e7081a50aab48adb346005d56a16fadbb Mon Sep 17 00:00:00 2001 From: Antoine Busque Date: Mon, 18 Apr 2016 18:34:11 -0400 Subject: [PATCH] Print bin location first MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Antoine Busque Signed-off-by: Jérémie Galarneau --- include/babeltrace/trace-debuginfo.h | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/include/babeltrace/trace-debuginfo.h b/include/babeltrace/trace-debuginfo.h index 2733e99a..ed629231 100644 --- a/include/babeltrace/trace-debuginfo.h +++ b/include/babeltrace/trace-debuginfo.h @@ -52,10 +52,22 @@ void ctf_text_integer_write_debug_info(struct bt_stream_pos *ppos, fprintf(pos->fp, ", debug_info = { "); + if (debug_info_src->bin_path) { + fprintf(pos->fp, "bin = \"%s%s\"", + opt_debug_info_full_path ? + debug_info_src->bin_path : + debug_info_src->short_bin_path, + debug_info_src->bin_loc); + add_comma = true; + } + if (debug_info_src->func) { + if (add_comma) { + fprintf(pos->fp, ", "); + } + fprintf(pos->fp, "func = \"%s\"", debug_info_src->func); - add_comma = true; } if (debug_info_src->src_path) { @@ -71,18 +83,6 @@ void ctf_text_integer_write_debug_info(struct bt_stream_pos *ppos, debug_info_src->line_no); } - if (debug_info_src->bin_path) { - if (add_comma) { - fprintf(pos->fp, ", "); - } - - fprintf(pos->fp, "bin = \"%s%s\"", - opt_debug_info_full_path ? - debug_info_src->bin_path : - debug_info_src->short_bin_path, - debug_info_src->bin_loc); - } - fprintf(pos->fp, " }"); } } -- 2.34.1