From mboxrd@z Thu Jan 1 00:00:00 1970 From: sboisvert@gydle.com (Sebastien Boisvert) Date: Sat, 29 Oct 2016 23:38:23 +0200 Subject: [lttng-dev] babeltrace question (bt_struct_declaration_lookup_field_index) Message-ID: <09d37d27-64e3-8ffb-18ab-1e050309ac5a@gydle.com> 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 ?