X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=ltt%2Fbranches%2Fpoly%2Fltt%2Fmarker.c;h=7b19391b0734baf67b6d2b0566ee5d0a5dfdb293;hb=7f440a66c6e6429ce477d208545b6965554ba4cb;hp=0ff55f45ef925a115a31d4772c42cda630d1ce40;hpb=f2a74ed3fec31023600e9f24b318d9b9cc2c9a12;p=lttv.git diff --git a/ltt/branches/poly/ltt/marker.c b/ltt/branches/poly/ltt/marker.c index 0ff55f45..7b19391b 100644 --- a/ltt/branches/poly/ltt/marker.c +++ b/ltt/branches/poly/ltt/marker.c @@ -80,7 +80,7 @@ static inline const char *parse_trace_type(struct marker_info *info, *trace_type = LTT_TYPE_STRING; goto parse_end; case 'p': - *trace_type = LTT_TYPE_UNSIGNED_INT; + *trace_type = LTT_TYPE_POINTER; *trace_size = info->pointer_size; goto parse_end; case 'd': @@ -184,7 +184,7 @@ static inline const char *parse_c_type(struct marker_info *info, *c_type = LTT_TYPE_STRING; goto parse_end; case 'p': - *c_type = LTT_TYPE_UNSIGNED_INT; + *c_type = LTT_TYPE_POINTER; *c_size = info->pointer_size; goto parse_end; case 'd': @@ -250,6 +250,7 @@ static inline long add_type(struct marker_info *info, switch (trace_type) { case LTT_TYPE_SIGNED_INT: case LTT_TYPE_UNSIGNED_INT: + case LTT_TYPE_POINTER: field->size = trace_size; field->alignment = trace_size; field->attributes = attributes; @@ -299,6 +300,7 @@ long marker_update_fields_offsets(struct marker_info *info, const char *data) switch (field->type) { case LTT_TYPE_SIGNED_INT: case LTT_TYPE_UNSIGNED_INT: + case LTT_TYPE_POINTER: field->offset = offset + ltt_align(offset, field->alignment, info->alignment); offset = field->offset + field->size; @@ -428,7 +430,7 @@ int marker_id_event(LttTrace *trace, GQuark name, guint16 id, struct marker_info *info, *head; int found = 0; - if (trace->markers->len < id) + if (trace->markers->len <= id) trace->markers = g_array_set_size(trace->markers, id+1); info = &g_array_index(trace->markers, struct marker_info, id); info->name = name;