LttFacility *ltt_event_facility(const LttEvent *e)
{
LttTrace * trace = e->tracefile->trace;
- unsigned id = e->event_id;
- return ltt_trace_facility_by_id(trace,id);
+ unsigned id = e->facility_id;
+ LttFacility *facility = ltt_trace_facility_by_id(trace,id);
+
+ g_assert(facility->exists);
+
+ return facility;
}
/*****************************************************************************
}
+
+LttTracefile *ltt_event_position_tracefile(LttEventPosition *ep)
+{
+ return ep->tracefile;
+}
+
/*****************************************************************************
*Function name
* ltt_event_cpu_i: get the cpu id where the event happens
LttTypeEnum t = f->field_type->type_class;
- g_assert(t == LTT_UINT || t == LTT_ENUM);
+ g_assert(t == LTT_UINT || t == LTT_ENUM
+ || t == LTT_ULONG || LTT_SIZE_T || LTT_OFF_T || LTT_POINTER);
if(f->field_size == 1){
guint8 x = *(guint8 *)(e->data + f->offset_root);
// e->tracefile->trace->system_description->endian ? 0:1;
gboolean reverse_byte_order = LTT_GET_BO(e->tracefile);
- g_assert( f->field_type->type_class == LTT_INT);
+ g_assert( f->field_type->type_class == LTT_INT
+ || f->field_type->type_class == LTT_LONG
+ || f->field_type->type_class == LTT_SSIZE_T);
if(f->field_size == 1){
gint8 x = *(gint8 *)(e->data + f->offset_root);