Process state in gui
authorYannick Brosseau <yannick.brosseau@gmail.com>
Thu, 12 Jul 2012 20:22:37 +0000 (16:22 -0400)
committerYannick Brosseau <yannick.brosseau@gmail.com>
Thu, 12 Jul 2012 20:22:37 +0000 (16:22 -0400)
Signed-off-by: Yannick Brosseau <yannick.brosseau@gmail.com>
lttv/lttv/state.c
lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c

index 40f95c41639fe7bdb00dfeda67746ebe545bf054..7e9ce546eb2f636165af2c5805e76054debaf1ec 100644 (file)
@@ -3434,11 +3434,16 @@ void lttv_state_add_event_hooks(LttvTraceset *traceset)
        
        LttvAttributeValue value;
        LttvHooks*event_hook;
+#ifdef BABEL_CLEANUP   
        LttvIAttribute *attributes = LTTV_IATTRIBUTE(lttv_global_attributes());
        result = lttv_iattribute_find_by_path(attributes, "hooks/event",
                                              LTTV_POINTER, &value);
        g_assert(result);
        event_hook = *(value.v_pointer);
+#endif
+       //TODO ybrosseau 2012-07-12: Validate that using traceset hooks instead of the global one is valid
+       //Use traceset hooks 
+       event_hook = lttv_traceset_get_hooks(traceset);
        g_assert(event_hook);
 
        lttv_hooks_add(event_hook,syscall_entry , NULL, LTTV_PRIO_STATE);       
index a8a7ad9ed1ed3cd6b3321d9775bd0b5ee4028472..123cb7a23da557213aa95204029ea927814cc737 100644 (file)
@@ -313,6 +313,7 @@ int SetTraceset(Tab * tab, LttvTraceset *traceset)
     new_time_window.end_time = ltt_time_add(new_time_window.start_time,
                                             new_time_window.time_width) ;
   }
+  lttv_state_add_event_hooks(traceset);
 
   /* Finally, call the update hooks of the viewers */
   gint retval = update_traceset(tab, traceset);
@@ -3998,9 +3999,10 @@ void init_tab(Tab *tab, MainWindow * mw, Tab *copy_tab,
   tab->traceset_info->traceset_context =
     g_object_new(LTTV_TRACESET_STATS_TYPE, NULL);
   //add state update hooks
-  lttv_state_add_event_hooks(
-       (LttvTracesetState*)tab->traceset_info->traceset_context);
 #endif //BABEL_CLEANUP
+  lttv_state_add_event_hooks(
+       tab->traceset_info->traceset);
+
   //determine the current_time and time_window of the tab
 #if 0
   if(copy_tab != NULL){
This page took 0.027596 seconds and 4 git commands to generate.