Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: sboisvert@gydle.com (Sebastien Boisvert)
Subject: [lttng-dev] babeltrace question (bt_struct_declaration_lookup_field_index)
Date: Sat, 29 Oct 2016 23:38:23 +0200	[thread overview]
Message-ID: <09d37d27-64e3-8ffb-18ab-1e050309ac5a@gydle.com> (raw)

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 ?


                 reply	other threads:[~2016-10-29 21:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=09d37d27-64e3-8ffb-18ab-1e050309ac5a@gydle.com \
    --to=sboisvert@gydle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox