- unsigned field_pos; //field position within its parent
- LttType * field_type; //field type, if it is root field
- //then it must be struct type
-
- off_t offset_root; //offset from the root, -1:uninitialized
- short fixed_root; //offset fixed according to the root
- //-1:uninitialized, 0:unfixed, 1:fixed
- off_t offset_parent; //offset from the parent,-1:uninitialized
- short fixed_parent; //offset fixed according to its parent
- //-1:uninitialized, 0:unfixed, 1:fixed
- // void * base_address; //base address of the field ????
-
- int field_size; //>0: size of the field,
- //0 : uncertain
- //-1: uninitialize
- int sequ_number_size; //the size of unsigned used to save the
- //number of elements in the sequence
-
- int element_size; //the element size of the sequence
- int field_fixed; //0: field has string or sequence
- //1: field has no string or sequenc
- //-1: uninitialize
-
- struct _LttField * parent;
- struct _LttField ** child; //for array, sequence and struct:
- //list of fields, it may have only one
- //field if the element is not a struct
- unsigned current_element; //which element is currently processed
+ GQuark name;
+ gchar *description;
+ LttType field_type; //field type
+
+ off_t offset_root; //offset from the root
+ enum field_status fixed_root; //offset fixed according to the root
+
+ guint field_size; // size of the field
+ // Only if field type size is set to 0
+ // (it's variable), then the field_size should be
+ // dynamically calculated while reading the trace
+ // and put here. Otherwise, the field_size always
+ // equels the type size.
+ off_t array_offset; // offset of the beginning of the array (for array
+ // and sequences)
+ GArray * dynamic_offsets; // array of offsets calculated dynamically at
+ // each event for sequences and arrays that
+ // contain variable length fields.