fix process names
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 17 Dec 2005 04:02:41 +0000 (04:02 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Sat, 17 Dec 2005 04:02:41 +0000 (04:02 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1414 04897980-b3bd-0310-b5e0-8ef037075253

ltt/branches/poly/ltt/event.c
ltt/branches/poly/ltt/event.h
ltt/branches/poly/lttv/lttv/state.c

index 6265f7fbd6e92188062cd14083f1c2e0fbc7a0fe..cf0b21f5c541f255100c993d10cd60eece45a7bc 100644 (file)
@@ -489,6 +489,14 @@ LttField *ltt_event_field_element_select(LttEvent *e, LttField *f, gulong i)
   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
index f243851f6033f84c0ee4ad2f921ab699f32ecb14..ac3244a5fcc36bb89192439b50296ece7c14aa95 100644 (file)
@@ -98,6 +98,7 @@ guint64 ltt_event_field_element_number(LttEvent *e, LttField *f);
 
 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
index 728e589928657b44f29408c59f1680cb3019ed3c..22c1d3bf6ed6c3401646a8bbeff81f9f60dec8d4 100644 (file)
@@ -1382,13 +1382,15 @@ static gboolean process_exec(void *hook_data, void *call_data)
   /* 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;
 }
 
This page took 0.026085 seconds and 4 git commands to generate.