Fix debug-info: handle event layouts of lttng-ust traces prior to 2.9
[babeltrace.git] / plugins / lttng-utils / debug-info.c
index 24e0a9f1bdf6f4dbbb0ce2145d1b8b6f49cfdbc3..2ac4002f910e998997efea8f2ef41fa71a2a3385 100644 (file)
@@ -516,7 +516,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 +524,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 +563,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.024657 seconds and 4 git commands to generate.