iterate on event fields
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 16 Dec 2005 19:10:40 +0000 (19:10 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 16 Dec 2005 19:10:40 +0000 (19:10 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1400 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/lttv/lttv/print.c

index 95ea97bee39b51dd8415594f3c2640b2c6c04f53..b0f1d58845df7ff87d3e6d3848a493259cb86e9e 100644 (file)
@@ -165,11 +165,12 @@ void lttv_event_to_string(LttEvent *e, GString *s,
   LttvTraceState *ts = (LttvTraceState*)tfs->parent.t_context;
   LttvProcessState *process = ts->running_process[cpu];
 
+  guint i, num_fields;
+
   g_string_set_size(s,0);
 
   facility = ltt_event_facility(e);
   event_type = ltt_event_eventtype(e);
-  field = ltt_event_field(e);
 
   if(mandatory_fields) {
     time = ltt_event_time(e);
@@ -184,9 +185,12 @@ void lttv_event_to_string(LttEvent *e, GString *s,
                    process->ppid,
                    g_quark_to_string(process->state->t));
   }
-
-  if(field)
+  
+  num_fields = ltt_event_num_fields(e);
+  for(i=0; i<num_fields; i++) {
+    field = ltt_event_field(e, i);
     lttv_print_field(e, field, s, field_names);
+  }
 } 
 
 static void init()
This page took 0.024025 seconds and 4 git commands to generate.