Process state in gui
[lttv.git] / lttv / lttv / state.c
index 954d4f1b225068b09e4a1c401c84de6f229f7bff..7e9ce546eb2f636165af2c5805e76054debaf1ec 100644 (file)
@@ -1460,7 +1460,7 @@ void lttv_state_save(LttvTraceState *self, LttvAttribute *container)
        /* Save the current position */
        value = lttv_attribute_add(container, LTTV_STATE_POSITION,
                        LTTV_POINTER);
-       *(value.v_pointer) = lttv_traceset_create_position(lttv_trace_get_traceset(self->trace));
+       *(value.v_pointer) = lttv_traceset_create_current_position(lttv_trace_get_traceset(self->trace));
 
 #ifdef BABEL_CLEANUP
        nb_tracefile = self->parent.tracefiles->len;
@@ -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);       
This page took 0.040775 seconds and 4 git commands to generate.