fix marker id off by one
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 11 Oct 2007 17:25:54 +0000 (17:25 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Thu, 11 Oct 2007 17:25:54 +0000 (17:25 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@2657 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/marker.c
ltt/branches/poly/ltt/tracefile.c
ltt/branches/poly/lttv/lttv/state.c

index 0ff55f45ef925a115a31d4772c42cda630d1ce40..f344be05340ded706200692dd26cac1d0cf1806e 100644 (file)
@@ -428,7 +428,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;
index 59575e7a330c370969d8ceb4a0850a1905716711..e38873755766b493e9111e717a747b335303b7e6 100644 (file)
@@ -1104,6 +1104,8 @@ int ltt_process_facility_tracefile(LttTracefile *tf)
          //pos += ltt_align((size_t)pos, tf->trace->arch_size, tf->alignment);
           pos += ltt_align((size_t)pos, sizeof(uint16_t), tf->alignment);
           id = ltt_get_uint16(LTT_GET_BO(tf), pos);
+          g_debug("In MARKER_ID_SET_MARKER_ID of marker %s id %hu",
+               marker_name, id);
           pos += sizeof(guint16);
           int_size = *(guint8*)pos;
           pos += sizeof(guint8);
index 06d22007b1beb1c3f01feec428a5247e1153b9d8..4d5afc30ca86c1d09afeda08b6a3dc43dce7a6ae 100644 (file)
@@ -21,6 +21,7 @@
 #include <config.h>
 #endif
 
+#include <glib.h>
 #include <lttv/lttv.h>
 #include <lttv/module.h>
 #include <lttv/state.h>
This page took 0.029429 seconds and 4 git commands to generate.