* 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"
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) {
ret = get_stream_event_context_int_field_value(err,
event, "_vpid", &vpid);
if (ret) {
- fprintf(err, "[error] %s in %s:%d\n", __func__,
- __FILE__, __LINE__);
- ret = -1;
goto end;
}
if (ret) {
fprintf(err, "[error] %s in %s:%d\n", __func__,
__FILE__, __LINE__);
- ret = -1;
goto end;
}
if (ret) {
fprintf(err, "[error] %s in %s:%d\n", __func__,
__FILE__, __LINE__);
- ret = -1;
goto end;
}
ret = get_stream_event_context_int_field_value(err, event,
"_vpid", &vpid);
if (ret) {
- fprintf(err, "[error] %s in %s:%d\n", __func__,
- __FILE__, __LINE__);
- ret = -1;
goto end;
}
if (ret) {
fprintf(err, "[error] %s in %s:%d\n", __func__,
__FILE__, __LINE__);
- ret = -1;
goto end;
}
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;
}
ret = get_stream_event_context_int_field_value(err, event, "_vpid",
&vpid);
if (ret) {
- fprintf(err, "[error] %s in %s:%d\n", __func__,
- __FILE__, __LINE__);
- ret = -1;
- goto end;
- }
-
- if (!path) {
goto end;
}
ret = get_stream_event_context_int_field_value(err, event, "_vpid",
&vpid);
if (ret) {
- fprintf(err, "[error] %s in %s:%d\n", __func__,
- __FILE__, __LINE__);
- ret = -1;
goto end;
}
ret = get_stream_event_context_int_field_value(err, event,
"_vpid", &vpid);
if (ret) {
- fprintf(err, "[error] %s in %s:%d\n", __func__,
- __FILE__, __LINE__);
- ret = -1;
goto end;
}