AC_PREREQ(2.57)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
#AC_WITH_LTDL # not needed ?
-AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.41-12052006)
+AM_INIT_AUTOMAKE(LinuxTraceToolkitViewer,0.8.42-17052006)
AM_CONFIG_HEADER(config.h)
AM_PROG_LIBTOOL
typedef struct _LttvNameTables {
// FIXME GQuark *eventtype_names;
GQuark *syscall_names;
- guint nb_syscalls;
+ guint nb_syscalls;
GQuark *trap_names;
+ guint nb_traps;
GQuark *irq_names;
GQuark *soft_irq_names;
} LttvNameTables;
ltt_enum_string_get(t, i));
}
*/
-
+ name_tables->nb_traps = 256;
name_tables->trap_names = g_new(GQuark, 256);
for(i = 0 ; i < 256 ; i++) {
g_string_printf(fe_name, "trap %d", i);
}
} else {
name_tables->trap_names = NULL;
+ name_tables->nb_traps = 0;
}
if(!lttv_trace_find_hook(tcs->parent.t,
tcs->syscall_names = name_tables->syscall_names;
tcs->nb_syscalls = name_tables->nb_syscalls;
tcs->trap_names = name_tables->trap_names;
+ tcs->nb_traps = name_tables->nb_traps;
tcs->irq_names = name_tables->irq_names;
tcs->soft_irq_names = name_tables->soft_irq_names;
}
LttvExecutionSubmode submode;
- submode = ((LttvTraceState *)(s->parent.t_context))->trap_names[
- ltt_event_get_unsigned(e, f)];
+ guint nb_traps = ((LttvTraceState *)(s->parent.t_context))->nb_traps;
+ guint trap = ltt_event_get_unsigned(e, f);
+
+ if(trap < nb_traps) {
+ submode = ((LttvTraceState *)(s->parent.t_context))->trap_names[trap];
+ } else {
+ /* Fixup an incomplete trap table */
+ GString *string = g_string_new("");
+ g_string_printf(string, "trap %u", trap);
+ submode = g_quark_from_string(string->str);
+ g_string_free(string, TRUE);
+ }
+
push_state(s, LTTV_STATE_TRAP, submode);
return FALSE;
}
/* Block/char devices, locks, memory pages... */
GQuark *eventtype_names;
GQuark *syscall_names;
- guint nb_syscalls;
+ guint nb_syscalls;
GQuark *trap_names;
+ guint nb_traps;
GQuark *irq_names;
GQuark *soft_irq_names;
LttTime *max_time_state_recomputed_in_seek;
#include <gdk/gdk.h>
#include <lttv/lttv.h>
#include <lttvwindow/lttvwindow.h>
+#include <lttvwindow/lttvwindowtraces.h>
#include "cfv.h"
#include "drawing.h"
LttvTracesetState *tss,
LttTime end_time)
{
- gint x, x_end, width;
+ gint x, width;
+ guint x_end;
ControlFlowData *cfd = events_request->viewer_data;
LttvTracesetContext *tsc = (LttvTracesetContext*)tss;
{
//g_debug("motion");
//eventually follow mouse and show time here
+ return 0;
}
#include <lttv/state.h>
#include <lttv/lttv.h>
+#include "drawing.h"
#include "drawitem.h"
gtk_adjustment_set_value(control_flow_data->v_adjust,
gtk_adjustment_get_value(control_flow_data->v_adjust) + cell_height);
break;
+ default:
+ g_error("should only scroll up and down.");
}
return TRUE;
}
#include <glib.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
+#include <gdk/gdkx.h>
#include <string.h>
#include <ltt/ltt.h>
gtk_adjustment_set_value(event_viewer_data->vadjust_c,
gtk_adjustment_get_value(event_viewer_data->vadjust_c) + 1);
break;
+ default:
+ g_error("Only scroll up and down expected");
}
return TRUE;
}
EventViewerData *event_viewer_data = (EventViewerData*) hook_data;
get_events(event_viewer_data->vadjust_c->value, event_viewer_data);
+ return 0;
}
void gui_events_free(EventViewerData *event_viewer_data)
}
-void create_main_window_with_trace(gchar *path)
+void create_main_window_with_trace(const gchar *path)
{
if(path == NULL) return;
void main_window_free(MainWindow * mw);
void main_window_destructor(MainWindow * mw);
-void create_main_window_with_trace(gchar *path);
+void create_main_window_with_trace(const gchar *path);
void insert_viewer_wrap(GtkWidget *menuitem, gpointer user_data);
gboolean execute_events_requests(Tab *tab);
#include <gtk/gtk.h>
#include <glib.h>
+#include <string.h>
#include <lttv/lttv.h>
#include <lttv/attribute.h>
GtkWidget *main_window_get_widget(Tab *tab);
+void set_current_position(Tab *tab, const LttvTracesetContextPosition *pos);
+
#endif //LTTVWINDOW_H
case LTTV_GOBJECT:
if(LTTV_IS_ATTRIBUTE(*(value.v_gobject))) {
subtree = (LttvAttribute *)*(value.v_gobject);
- if(is_named)
- sprintf(dir_str, "%s", g_quark_to_string(name));
- else
- sprintf(dir_str, "%lu", name);
- gtk_tree_store_append (store, &iter, parent);
- gtk_tree_store_set (store, &iter,NAME_COLUMN,dir_str,-1);
- path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
- str = gtk_tree_path_to_string (path);
- g_hash_table_insert(statistic_viewer_data->statistic_hash,
+ if(is_named)
+ sprintf(dir_str, "%s", g_quark_to_string(name));
+ else
+ sprintf(dir_str, "%u", name);
+ gtk_tree_store_append (store, &iter, parent);
+ gtk_tree_store_set (store, &iter,NAME_COLUMN,dir_str,-1);
+ path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &iter);
+ str = gtk_tree_path_to_string (path);
+ g_hash_table_insert(statistic_viewer_data->statistic_hash,
(gpointer)str, subtree);
show_tree(statistic_viewer_data, subtree, &iter);
}
if(is_named)
sprintf(type_name,"%s", g_quark_to_string(name));
else
- sprintf(type_name,"%lu", name);
+ sprintf(type_name,"%u", name);
type_value[0] = '\0';
switch(type) {
case LTTV_INT:
#endif
#include <glib.h>
+#include <glib/gprintf.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gdk/gdk.h>
#include <lttvwindow/lttvwindow.h>
#include <lttvwindow/lttvwindowtraces.h>
+#include <lttvwindow/callbacks.h>
#include "hTraceControlInsert.xpm"
#include "TraceControlStart.xpm"