return field;
}
+
+off_t ltt_event_field_offset(LttEvent *e, LttField *f)
+{
+ return f->offset_root;
+}
+
+
+
/*****************************************************************************
* These functions extract data from an event after architecture specific
* conversions
LttField *ltt_event_field_element_select(LttEvent *e, LttField *f, gulong i);
+off_t ltt_event_field_offset(LttEvent *e, LttField *f);
/* A union is like a structure except that only a single member at a time
is present depending on the specific event instance. This function tells
/* PID of the process to release */
guint64 name_len = ltt_event_field_element_number(e, thf->f1);
//name = ltt_event_get_string(e, thf->f1);
- gchar *name_begin = ltt_event_field_element_select(e, thf->f1, 0);
+ LttField *child = ltt_event_field_element_select(e, thf->f1, 0);
+ gchar *name_begin =
+ (gchar*)(ltt_event_data(e)+ltt_event_field_offset(e, child));
gchar *null_term_name = g_new(gchar, name_len+1);
memcpy(null_term_name, name_begin, name_len);
null_term_name[name_len] = '\0';
process->name = g_quark_from_string(null_term_name);
-
+ g_free(null_term_name);
return FALSE;
}