From b7022cb56a30bb20891845e1d4e9e6446345d872 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Tue, 16 Apr 2019 17:14:29 -0400 Subject: [PATCH] flt.lttng-utils.debug-info: cleanup: only print debug message on error Signed-off-by: Francis Deslauriers --- plugins/lttng-utils/bin-info.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/lttng-utils/bin-info.c b/plugins/lttng-utils/bin-info.c index daf61e2c..c810f8c6 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; -- 2.34.1