saved state fixes
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 16 Jul 2004 03:38:14 +0000 (03:38 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Fri, 16 Jul 2004 03:38:14 +0000 (03:38 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@627 04897980-b3bd-0310-b5e0-8ef037075253

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

index d8cbe8c63c2c4a83f1e018981e231bc2ce66a649..66bf39c83d91a3107fc098d3ca068b8e193f4361 100644 (file)
@@ -448,7 +448,8 @@ static void state_restore(LttvTraceState *self, LttvAttribute *container)
     if(*(value.v_pointer) == NULL) tfcs->parent.e = NULL;
     else {
       ep = *(value.v_pointer);
-      lttv_process_tracefile_seek_position(tfcs->parent, ep);
+      g_assert(tfcs->parent.t_context != NULL);
+      lttv_process_tracefile_seek_position(LTTV_TRACEFILE_CONTEXT(tfcs), ep);
     }
   }
 }
@@ -1233,6 +1234,15 @@ void lttv_state_save_add_event_hooks(LttvTracesetState *self)
   }
 }
 
+gint lttv_state_save_hook_add_event_hooks(void *hook_data, void *call_data)
+{
+  LttvTracesetState *tss = (LttvTracesetState*)(call_data);
+
+  lttv_state_save_add_event_hooks(tss);
+
+  return 0;
+}
+
 
 void lttv_state_save_remove_event_hooks(LttvTracesetState *self)
 {
@@ -1268,6 +1278,14 @@ void lttv_state_save_remove_event_hooks(LttvTracesetState *self)
   }
 }
 
+gint lttv_state_save_hook_remove_event_hooks(void *hook_data, void *call_data)
+{
+  LttvTracesetState *tss = (LttvTracesetState*)(call_data);
+
+  lttv_state_save_remove_event_hooks(tss);
+
+  return 0;
+}
 
 void lttv_state_traceset_seek_time_closest(LttvTracesetState *self, LttTime t)
 {
index 06d69c0462e40a99b13a097e0c20cc7e6c119eee..54277f4fe3c988fe56c716ca99e0cd7569d4f304 100644 (file)
@@ -65,8 +65,12 @@ void lttv_state_add_event_hooks(LttvTracesetState *self);
 void lttv_state_remove_event_hooks(LttvTracesetState *self);
 
 void lttv_state_save_add_event_hooks(LttvTracesetState *self);
+// Hook wrapper. call_data is a trace context.
+gint lttv_state_save_hook_add_event_hooks(void *hook_data, void *call_data);
 
 void lttv_state_save_remove_event_hooks(LttvTracesetState *self);
+// Hook wrapper. call_data is a trace context.
+gint lttv_state_save_hook_remove_event_hooks(void *hook_data, void *call_data);
 
 void lttv_state_traceset_seek_time_closest(LttvTracesetState *self, LttTime t);
 
index dd52153f589ed6454141f3036c6f6bcf427087bf..406431261da4f8f14c929f6e71fa97ad9ed8ee39 100644 (file)
@@ -1029,7 +1029,7 @@ LttTime lttv_traceset_context_position_get_time(
 LttvTracefileContext *lttv_traceset_context_get_current_tfc(LttvTracesetContext *self)
 {
   GTree *pqueue = self->pqueue;
-  LttvTracefileContext *tfc;
+  LttvTracefileContext *tfc = NULL;
 
   g_tree_foreach(pqueue, get_first, &tfc);
 
This page took 0.026214 seconds and 4 git commands to generate.