From: Francis Deslauriers Date: Tue, 16 Apr 2019 21:14:29 +0000 (-0400) Subject: flt.lttng-utils.debug-info: cleanup: only print debug message on error X-Git-Url: http://git.efficios.com/?p=deliverable%2Fbabeltrace.git;a=commitdiff_plain;h=2e96bbce714f65f5d60497a37b96405a9c625a06 flt.lttng-utils.debug-info: cleanup: only print debug message on error Signed-off-by: Francis Deslauriers --- diff --git a/plugins/lttng-utils/bin-info.c b/plugins/lttng-utils/bin-info.c index daf61e2cf..c810f8c6f 100644 --- a/plugins/lttng-utils/bin-info.c +++ b/plugins/lttng-utils/bin-info.c @@ -1120,11 +1120,19 @@ int bin_info_lookup_function_name(struct bin_info *bin, } if (bin->is_elf_only) { - ret = bin_info_lookup_elf_function_name(bin, addr, &_func_name); - BT_LOGD("Failed to lookup function name (ELF): ret=%d", ret); + ret = bin_info_lookup_elf_function_name(bin, addr, + &_func_name); + if (ret) { + BT_LOGD("Failed to lookup function name (ELF): " + "ret=%d", ret); + } } else { - ret = bin_info_lookup_dwarf_function_name(bin, addr, &_func_name); - BT_LOGD("Failed to lookup function name (DWARF): ret=%d", ret); + ret = bin_info_lookup_dwarf_function_name(bin, addr, + &_func_name); + if (ret) { + BT_LOGD("Failed to lookup function name (DWARF): " + "ret=%d", ret); + } } *func_name = _func_name;