#include <lttv/option.h>
#include <lttv/traceset.h>
#include <ltt/trace.h>
+#include <stdio.h>
+
void lttv_option_init(int argc, char **argv);
void lttv_option_destroy();
static void lttv_module_path_option(void *hook_data);
-#ifdef MEMDEBUG
-extern struct GMemVTable *glib_mem_profiler_table;
-#endif
-
+static void lttv_help(void);
/* Since everything is done in modules, the main program only takes care
of the infrastructure. */
g_mem_profile();
#endif
+ g_type_init();
+ //g_type_init_with_debug_flags (G_TYPE_DEBUG_OBJECTS | G_TYPE_DEBUG_SIGNALS);
+
attributes = LTTV_IATTRIBUTE(g_object_new(LTTV_ATTRIBUTE_TYPE, NULL));
before_options = lttv_hooks_new();
"add a directory to the module search path",
"directory to add to the path", LTTV_OPT_STRING, &a_module_path,
lttv_module_path_option, NULL);
-
+
+ lttv_option_add("help",'h', "basic help", "none",
+ LTTV_OPT_NONE, NULL, lttv_help, NULL);
+
+
lttv_hooks_call(before_options, NULL);
lttv_option_parse(argc, argv);
lttv_hooks_call(after_options, NULL);
LttvAttribute *lttv_global_attributes()
{
- return attributes;
+ return (LttvAttribute*)attributes;
}
{
lttv_module_path_add(a_module_path);
}
+
+void lttv_help()
+{
+ printf("Linux Trace Toolkit Visualizer\n");
+ printf("\n");
+ lttv_option_show_help();
+ printf("\n");
+}