X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=plugins%2Flttng-utils%2Fdebug-info.h;h=bfdbccc1c22c71ca01ef15655010f0c905b0d07f;hb=58f6d595f244a048c5ca4d83a94e1f67af2e7890;hp=41618b0aa66645cdbafe4d559978d4fa12c2b296;hpb=456a4476cac0e5b5e5bec47a07243faee091eb72;p=babeltrace.git diff --git a/plugins/lttng-utils/debug-info.h b/plugins/lttng-utils/debug-info.h index 41618b0a..bfdbccc1 100644 --- a/plugins/lttng-utils/debug-info.h +++ b/plugins/lttng-utils/debug-info.h @@ -2,10 +2,11 @@ #define BABELTRACE_PLUGIN_DEBUG_INFO_H /* - * Babeltrace - Debug information Plug-in + * Babeltrace - Debug information Plugin * - * Copyright (c) 2015 EfficiOS Inc. + * Copyright (c) 2015-2019 EfficiOS Inc. * Copyright (c) 2015 Antoine Busque + * 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 @@ -26,79 +27,42 @@ * SOFTWARE. */ -#include #include -#include +#include #include -#include -#include -#include -#include -struct debug_info_component { - FILE *err; - char *arg_debug_info_field_name; - const char *arg_debug_dir; - bool arg_full_path; - const char *arg_target_prefix; -}; +#define VPID_FIELD_NAME "vpid" +#define IP_FIELD_NAME "ip" -struct debug_info_iterator { - struct debug_info_component *debug_info_component; - /* Map between struct bt_ctf_trace and struct bt_ctf_writer. */ - GHashTable *trace_map; - /* Map between reader and writer stream. */ - GHashTable *stream_map; - /* Map between reader and writer stream class. */ - GHashTable *stream_class_map; - /* Map between reader and writer stream class. */ - GHashTable *packet_map; - /* Map between a trace_class and its corresponding debug_info. */ - GHashTable *trace_debug_map; - /* Input iterators associated with this output iterator. */ - GPtrArray *input_iterator_group; - struct bt_notification *current_notification; - struct bt_notification_iterator *input_iterator; - FILE *err; -}; +BT_HIDDEN +bt_self_component_status debug_info_comp_init( + bt_self_component_filter *self_comp, + const bt_value *params, void *init_method_data); -struct debug_info_source { - /* Strings are owned by debug_info_source. */ - char *func; - uint64_t line_no; - char *src_path; - /* short_src_path points inside src_path, no need to free. */ - const char *short_src_path; - char *bin_path; - /* short_bin_path points inside bin_path, no need to free. */ - const char *short_bin_path; - /* - * Location within the binary. Either absolute (@0x1234) or - * relative (+0x4321). - */ - char *bin_loc; -}; +BT_HIDDEN +void debug_info_comp_finalize(bt_self_component_filter *self_comp); BT_HIDDEN -struct debug_info *debug_info_create(struct debug_info_component *comp); +bt_self_message_iterator_status debug_info_msg_iter_init( + bt_self_message_iterator *self_msg_iter, + bt_self_component_filter *self_comp, + bt_self_component_port_output *self_port); BT_HIDDEN -void debug_info_destroy(struct debug_info *debug_info); +bt_self_message_iterator_status debug_info_msg_iter_next( + bt_self_message_iterator *self_msg_iter, + const bt_message_array_const msgs, uint64_t capacity, + uint64_t *count); BT_HIDDEN -struct debug_info_source *debug_info_query(struct debug_info *debug_info, - int64_t vpid, uint64_t ip); +bt_bool debug_info_msg_iter_can_seek_beginning( + bt_self_message_iterator *message_iterator); BT_HIDDEN -void debug_info_handle_event(FILE *err, struct bt_ctf_event *event, - struct debug_info *debug_info); +bt_self_message_iterator_status debug_info_msg_iter_seek_beginning( + bt_self_message_iterator *message_iterator); -#if 0 -static inline -void trace_debug_info_destroy(struct bt_ctf_trace *trace) -{ - debug_info_destroy(trace->debug_info); -} -#endif +BT_HIDDEN +void debug_info_msg_iter_finalize(bt_self_message_iterator *it); #endif /* BABELTRACE_PLUGIN_DEBUG_INFO_H */