create directories branches, tags, trunk
[lttv.git] / ltt / branches / poly / lttv / lttv / main.c
index 29aa288e43a5715ec8dc284004c6bb3d3e8dc76e..eca23438b09cd6dc21eda2503598a777c65e705d 100644 (file)
@@ -67,6 +67,8 @@ static void lttv_verbose(void *hook_data);
 
 static void lttv_debug(void *hook_data);
 
+static void lttv_event_debug(void *hook_data);
+
 static void lttv_fatal(void *hook_data);
 
 static void lttv_help(void *hook_data);
@@ -75,14 +77,16 @@ static void lttv_help(void *hook_data);
    messages. It receives the message and does nothing. */
 
 void ignore_and_drop_message(const gchar *log_domain, GLogLevelFlags log_level,
-    const gchar *message, gpointer user_data) {
+    const gchar *message, gpointer user_data)
+{
 }
 
 
 /* Since everything is done in modules, the main program only takes care
    of the infrastructure. */
 
-int main(int argc, char **argv) {
+int main(int argc, char **argv)
+{
 
   int i;
 
@@ -181,6 +185,11 @@ int main(int argc, char **argv) {
   lttv_option_add("debug",'d', "print debugging messages", "none", 
       LTTV_OPT_NONE, NULL, lttv_debug, NULL);
 
+  /* use --edebug, -e conflicts with filter. Problem with option parsing when we
+   * reparse the options with different number of arguments. */
+  lttv_option_add("edebug",'e', "print event debugging", "none", 
+      LTTV_OPT_NONE, NULL, lttv_event_debug, NULL);
+
   a_fatal = FALSE;
   lttv_option_add("fatal",'f', "make critical messages fatal",
                   "none", 
@@ -237,7 +246,7 @@ LttvAttribute *lttv_global_attributes()
 
 
 void lttv_module_option(void *hook_data)
-{ 
+{
   GError *error = NULL;
 
   lttv_module_require(a_module, &error);
@@ -263,6 +272,12 @@ void lttv_debug(void *hook_data)
   g_info("Logging set to include DEBUG level messages");
 }
 
+void lttv_event_debug(void *hook_data)
+{
+  ltt_event_debug(1);
+  g_info("Output event detailed debug");
+}
+
 void lttv_fatal(void *hook_data)
 {
   g_log_set_always_fatal(G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL);
@@ -272,10 +287,10 @@ void lttv_fatal(void *hook_data)
 
 void lttv_help(void *hook_data)
 {
-       printf("Linux Trace Toolkit Visualizer\n");
-       printf("\n");
-       lttv_option_show_help();
-       printf("\n");
+  printf("Linux Trace Toolkit Visualizer " VERSION "\n");
+  printf("\n");
+  lttv_option_show_help();
+  printf("\n");
 }
 
 /* 
This page took 0.024459 seconds and 4 git commands to generate.