Remove legacy printf_verbose()/printf_debug() and others
[babeltrace.git] / plugins / lttng-utils / debug-info.c
index 24e0a9f1bdf6f4dbbb0ce2145d1b8b6f49cfdbc3..493898fdb43ef023c14cd2de603a3e8789f9bb85 100644 (file)
@@ -25,6 +25,9 @@
  * SOFTWARE.
  */
 
+#define BT_LOG_TAG "PLUGIN-CTF-LTTNG-UTILS-DEBUG-INFO-FLT"
+#include "logging.h"
+
 #include <assert.h>
 #include <glib.h>
 #include "debug-info.h"
@@ -119,7 +122,7 @@ struct debug_info_source *debug_info_source_create_from_bin(struct bin_info *bin
        if (!bin->is_elf_only || !debug_info_src->func) {
                /* Lookup source location */
                ret = bin_info_lookup_source_location(bin, ip, &src_loc);
-               printf_verbose("Failed to lookup source location (err: %i)\n", ret);
+               BT_LOGD("Failed to lookup source location: ret=%d", ret);
        }
 
        if (src_loc) {
@@ -516,7 +519,6 @@ void handle_bin_info_event(FILE *err, struct debug_info *debug_info,
        if (ret) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
-               ret = -1;
                goto end;
        }
 
@@ -525,16 +527,16 @@ void handle_bin_info_event(FILE *err, struct debug_info *debug_info,
        if (ret) {
                fprintf(err, "[error] %s in %s:%d\n", __func__,
                                __FILE__, __LINE__);
-               ret = -1;
                goto end;
        }
 
+       /*
+        * This field is not produced by the dlopen event emitted before
+        * lttng-ust 2.9.
+        */
        ret = get_payload_string_field_value(err,
                        event, "_path", &path);
-       if (ret) {
-               fprintf(err, "[error] %s in %s:%d\n", __func__,
-                               __FILE__, __LINE__);
-               ret = -1;
+       if (ret || !path) {
                goto end;
        }
 
@@ -564,10 +566,6 @@ void handle_bin_info_event(FILE *err, struct debug_info *debug_info,
                goto end;
        }
 
-       if (!path) {
-               goto end;
-       }
-
        if (memsz == 0) {
                /* Ignore VDSO. */
                goto end;
This page took 0.023983 seconds and 4 git commands to generate.