update for powerpc
authorcompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 17 May 2006 19:10:30 +0000 (19:10 +0000)
committercompudj <compudj@04897980-b3bd-0310-b5e0-8ef037075253>
Wed, 17 May 2006 19:10:30 +0000 (19:10 +0000)
git-svn-id: http://ltt.polymtl.ca/svn@1824 04897980-b3bd-0310-b5e0-8ef037075253

14 files changed:
ltt/branches/poly/configure.in
ltt/branches/poly/lttv/lttv/state.c
ltt/branches/poly/lttv/lttv/state.h
ltt/branches/poly/lttv/modules/gui/controlflow/cfv.c
ltt/branches/poly/lttv/modules/gui/controlflow/drawing.c
ltt/branches/poly/lttv/modules/gui/controlflow/drawitem.c
ltt/branches/poly/lttv/modules/gui/controlflow/processlist.c
ltt/branches/poly/lttv/modules/gui/detailedevents/events.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/callbacks.h
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/init_module.c
ltt/branches/poly/lttv/modules/gui/lttvwindow/lttvwindow/lttvwindow.h
ltt/branches/poly/lttv/modules/gui/statistics/statistics.c
ltt/branches/poly/lttv/modules/gui/tracecontrol/tracecontrol.c

index fe7a6d61f62c21570c29242c0c10ba71629ad949..02c656d50353918fbd9e913cd50dc625387b58fd 100644 (file)
@@ -23,7 +23,7 @@
 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
 
index 05ea74f1d866993b9f7dd02a2d17c3a422aed4d4..9201c81803d947a924e72da46b47b1a771d0c87c 100644 (file)
@@ -826,8 +826,9 @@ free_max_time(LttvTraceState *tcs)
 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;
@@ -918,7 +919,7 @@ create_name_tables(LttvTraceState *tcs)
                                        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);
@@ -926,6 +927,7 @@ create_name_tables(LttvTraceState *tcs)
                }
        } else {
                name_tables->trap_names = NULL;
+               name_tables->nb_traps = 0;
        }
 
   if(!lttv_trace_find_hook(tcs->parent.t,
@@ -988,6 +990,7 @@ get_name_tables(LttvTraceState *tcs)
   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;
 }
@@ -1359,8 +1362,19 @@ static gboolean trap_entry(void *hook_data, void *call_data)
 
   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;
 }
index 3b9dda4afa67921d5d2fe42a4afe4efbd4847928..62f8e3ab28c11bd010091260e7424f6830862bf6 100644 (file)
@@ -279,8 +279,9 @@ struct _LttvTraceState {
   /* 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;
index ad1e5fb77a89ebbc8f3f6294c4d99b92ace26898..33bcdd2a8c9df1bf1efff772c9450b6aaf88b10e 100644 (file)
@@ -25,6 +25,7 @@
 #include <gdk/gdk.h>
 #include <lttv/lttv.h>
 #include <lttvwindow/lttvwindow.h>
+#include <lttvwindow/lttvwindowtraces.h>
 
 #include "cfv.h"
 #include "drawing.h"
index 95f3887c048b9059edf7e6bb4ecfff683a1783e0..9aec7623cb8101159b6676618b48fa1f0293b19f 100644 (file)
@@ -575,7 +575,8 @@ void drawing_request_expose(EventsRequest *events_request,
                             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;
@@ -1454,4 +1455,5 @@ motion_notify_ruler(GtkWidget *widget, GdkEventMotion *event, gpointer user_data
 {
   //g_debug("motion");
   //eventually follow mouse and show time here
+  return 0;
 }
index 7e1980e24589f791a2a2c78a3c65d50849cb914f..d97628b021f3b9abed37236c0693a612328662b5 100644 (file)
 #include <lttv/state.h>
 #include <lttv/lttv.h>
 
+#include "drawing.h"
 #include "drawitem.h"
 
 
index cece72cb18c8364de99cc7ae3d94fe7d0834bf4e..3c9a5dad43590ddab5ba0982f70ddc43f8fed3d5 100644 (file)
@@ -160,6 +160,8 @@ gboolean scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer data)
       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;
 }
index b2390468ea950b531b708395f237a632160206e5..0a7f8b8d31a4a2c2ed7a2624f6ed08d549b19f19 100644 (file)
@@ -49,6 +49,7 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 #include <gdk/gdk.h>
+#include <gdk/gdkx.h>
 #include <string.h>
 
 #include <ltt/ltt.h>
@@ -1040,6 +1041,8 @@ gboolean tree_v_scroll_handler (GtkWidget *widget, GdkEventScroll *event, gpoint
                        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;
 }
@@ -1753,6 +1756,7 @@ gint redraw_notify(void *hook_data, void *call_data)
   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)
index e07f7f168ebba9934c839798520c4fb4742ed75a..4f2a9639e40fcd0fa4b201c835917764d27c1ff5 100644 (file)
@@ -4516,7 +4516,7 @@ gboolean execute_events_requests(Tab *tab)
 }
 
 
-void create_main_window_with_trace(gchar *path)
+void create_main_window_with_trace(const gchar *path)
 {
   if(path == NULL) return;
 
index e517472a6e0c60d424f3840b8da5ebcc4682a1ab..f38331aabafc201fd4e37c73f33dbaacac0d63fc 100644 (file)
@@ -27,7 +27,7 @@ MainWindow *construct_main_window(MainWindow * parent);
 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);
index 1ca5cf04cf154c8500202480f548bba5c6fd0d22..8c3f97296167e33bb44db14f47f24e4b02744c82 100644 (file)
@@ -27,6 +27,7 @@
 
 #include <gtk/gtk.h>
 #include <glib.h>
+#include <string.h>
 
 #include <lttv/lttv.h>
 #include <lttv/attribute.h>
index a3867f0287bb78ce5a718bedd871f66fef947424..ca0e203c329388cfb30595f3668b1358f9d32b57 100644 (file)
@@ -824,4 +824,6 @@ void events_request_free(EventsRequest *events_request);
 
 GtkWidget *main_window_get_widget(Tab *tab);
 
+void set_current_position(Tab *tab, const LttvTracesetContextPosition *pos);
+
 #endif //LTTVWINDOW_H
index d39b11d1f6900c5a5e74e8209870134b47431c5c..0e87e3822b6e8ade46cf440b82f5bb53c432cee8 100644 (file)
@@ -485,15 +485,15 @@ void show_tree(StatisticViewerData * statistic_viewer_data,
      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);
         }
@@ -522,7 +522,7 @@ void show_statistic(StatisticViewerData * statistic_viewer_data,
                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:
index 148a452b8b03d3edd70764556dbc799a53e795b4..8382655245abbae1e96fa41744c2978889173698 100644 (file)
@@ -21,6 +21,7 @@
 #endif
 
 #include <glib.h>
+#include <glib/gprintf.h>
 #include <string.h>
 #include <gtk/gtk.h>
 #include <gdk/gdk.h>
@@ -32,6 +33,7 @@
 
 #include <lttvwindow/lttvwindow.h>
 #include <lttvwindow/lttvwindowtraces.h>
+#include <lttvwindow/callbacks.h>
 
 #include "hTraceControlInsert.xpm"
 #include "TraceControlStart.xpm"
This page took 0.032597 seconds and 4 git commands to generate.