[lttng-dev] babeltrace question (bt_struct_declaration_lookup_field_index)

Sebastien Boisvert sboisvert at gydle.com
Sat Oct 29 21:38:23 UTC 2016


Hi,

I can successfully print the fields of my events by using

        stream = ctf_event->parent->stream;
        id = stream->event_id;
        event = g_ptr_array_index(stream->events_by_id, id);
        declaration = event->event_fields->declaration;
        fields = event->event_fields->fields;
        for (int i = 0; i < fields->len; i++) {
           /* ... * /
        }

By understanding is that one can use bt_struct_declaration_lookup_field_index to verify if a field exists.
However, I always get -1. Is there an API call to populate the hash ?


More information about the lttng-dev mailing list