/*
- * Babeltrace - Debug Information State Tracker
+ * SPDX-License-Identifier: MIT
*
* Copyright (c) 2015 EfficiOS Inc. and Linux Foundation
* Copyright (c) 2015 Philippe Proulx <pproulx@efficios.com>
* Copyright (c) 2016 Jérémie Galarneau <jeremie.galarneau@efficios.com>
* Copyright (c) 2019 Francis Deslauriers <francis.deslauriers@efficios.com>
*
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this software and associated documentation files (the "Software"), to deal
- * in the Software without restriction, including without limitation the rights
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- * copies of the Software, and to permit persons to whom the Software is
- * furnished to do so, subject to the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
+ * Babeltrace - Debug Information State Tracker
*/
#define BT_COMP_LOG_SELF_COMP self_comp
#define DEFAULT_DEBUG_INFO_FIELD_NAME "debug_info"
#define LTTNG_UST_STATEDUMP_PREFIX "lttng_ust"
-#define VPID_FIELD_NAME "vpid"
-#define IP_FIELD_NAME "ip"
-#define BADDR_FIELD_NAME "baddr"
-#define CRC32_FIELD_NAME "crc"
-#define BUILD_ID_FIELD_NAME "build_id"
-#define FILENAME_FIELD_NAME "filename"
-#define IS_PIC_FIELD_NAME "is_pic"
-#define MEMSZ_FIELD_NAME "memsz"
-#define PATH_FIELD_NAME "path"
struct debug_info_component {
bt_logging_level log_level;
g_strdup_printf("%"PRId64, src_loc->line_no);
if (!debug_info_src->line_no) {
BT_COMP_LOGE_APPEND_CAUSE(self_comp,
- "Error occured when setting `line_no` field.");
+ "Error occurred when setting `line_no` field.");
goto error;
}
} else if (q_event_name == debug_info->q_statedump_build_id) {
/* Build ID info */
handle_event_statedump_build_id(debug_info, event);
- } else if (q_event_name == debug_info-> q_lib_unload) {
+ } else if (q_event_name == debug_info->q_lib_unload) {
handle_event_lib_unload(debug_info, event);
}
}
static
-bt_message *handle_msg_iterator_inactivity(struct debug_info_msg_iter *debug_it,
+bt_message *handle_msg_iterator_inactivity(
+ struct debug_info_msg_iter *debug_it __attribute__((unused)),
const bt_message *in_message)
{
/*
return status;
}
-BT_HIDDEN
bt_component_class_initialize_method_status debug_info_comp_init(
bt_self_component_filter *self_comp_flt,
- bt_self_component_filter_configuration *config,
- const bt_value *params, __attribute__((unused)) void *init_method_data)
+ bt_self_component_filter_configuration *config __attribute__((unused)),
+ const bt_value *params, void *init_method_data __attribute__((unused)))
{
struct debug_info_component *debug_info_comp;
bt_component_class_initialize_method_status status =
return status;
}
-BT_HIDDEN
void debug_info_comp_finalize(bt_self_component_filter *self_comp_flt)
{
struct debug_info_component *debug_info =
destroy_debug_info_comp(debug_info);
}
-BT_HIDDEN
bt_message_iterator_class_next_method_status debug_info_msg_iter_next(
bt_self_message_iterator *self_msg_iter,
const bt_message_array_const msgs, uint64_t capacity,
return;
}
-BT_HIDDEN
bt_message_iterator_class_initialize_method_status debug_info_msg_iter_init(
bt_self_message_iterator *self_msg_iter,
bt_self_message_iterator_configuration *config,
- bt_self_component *self_comp,
- bt_self_component_port_output *self_port)
+ bt_self_component_port_output *self_port __attribute__((unused)))
{
bt_message_iterator_class_initialize_method_status status;
bt_message_iterator_create_from_message_iterator_status
struct debug_info_msg_iter *debug_info_msg_iter = NULL;
gchar *debug_info_field_name;
int ret;
+ bt_self_component *self_comp =
+ bt_self_message_iterator_borrow_component(self_msg_iter);
bt_logging_level log_level = bt_component_get_logging_level(
bt_self_component_as_component(self_comp));
return status;
}
-BT_HIDDEN
bt_message_iterator_class_can_seek_beginning_method_status
debug_info_msg_iter_can_seek_beginning(bt_self_message_iterator *self_msg_iter,
bt_bool *can_seek)
debug_info_msg_iter->msg_iter, can_seek);
}
-BT_HIDDEN
bt_message_iterator_class_seek_beginning_method_status
debug_info_msg_iter_seek_beginning(bt_self_message_iterator *self_msg_iter)
{
return status;
}
-BT_HIDDEN
void debug_info_msg_iter_finalize(bt_self_message_iterator *it)
{
struct debug_info_msg_iter *debug_info_msg_iter;