X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=blobdiff_plain;f=include%2Fbabeltrace%2Ftypes.h;h=e92fb8426286ce032921bcdfe973b7c7448dbc01;hp=7db83164f6c36eead37443dd05a83ec312555426;hb=eb75a494900f763d9daca6a9bab5a8f01ffe552f;hpb=e5a73b906c4ef25a05f56dd41d61e58fb73254e5 diff --git a/include/babeltrace/types.h b/include/babeltrace/types.h index 7db83164..e92fb842 100644 --- a/include/babeltrace/types.h +++ b/include/babeltrace/types.h @@ -148,6 +148,10 @@ struct declaration_integer { struct ctf_clock *clock; }; +#ifdef ENABLE_DEBUG_INFO +struct debug_info_source; +#endif + struct definition_integer { struct bt_definition p; struct declaration_integer *declaration; @@ -156,6 +160,17 @@ struct definition_integer { uint64_t _unsigned; int64_t _signed; } value; + +#ifdef ENABLE_DEBUG_INFO + /* + * Debug infos (NULL if not set). + * + * This is extended debug informations set by the CTF input plugin + * itself when available. If it's set, then this integer definition + * is the "_ip" field of the stream event context. + */ + struct debug_info_source *debug_info_src; +#endif }; struct declaration_float { @@ -437,6 +452,8 @@ enum ctf_string_encoding bt_get_string_encoding(const struct bt_definition *fiel double bt_get_float(const struct bt_definition *field); +const struct bt_definition *bt_get_variant_field(struct bt_definition *definition); + struct declaration_struct * bt_struct_declaration_new(struct declaration_scope *parent_scope, uint64_t min_align); @@ -455,10 +472,10 @@ struct declaration_field * bt_struct_declaration_get_field_from_index(struct declaration_struct *struct_declaration, int index); struct bt_definition * -bt_struct_definition_get_field_from_index(struct definition_struct *struct_definition, +bt_struct_definition_get_field_from_index(const struct definition_struct *struct_definition, int index); int bt_struct_rw(struct bt_stream_pos *pos, struct bt_definition *definition); -uint64_t bt_struct_declaration_len(struct declaration_struct *struct_declaration); +uint64_t bt_struct_declaration_len(const struct declaration_struct *struct_declaration); /* * The tag enumeration is validated to ensure that it contains only mappings @@ -525,6 +542,8 @@ void bt_append_scope_path(const char *path, GArray *q); */ struct bt_definition *bt_lookup_definition(const struct bt_definition *definition, const char *field_name); +struct bt_definition *bt_lookup_definition_by_quark(const struct bt_definition *definition, + GQuark quark); struct definition_integer *bt_lookup_integer(const struct bt_definition *definition, const char *field_name, int signedness);