[evolution-patches] Coredumper support




Hi there,

There still one patch pending in my checkout, thats the coredumper patch.

It adds support for google's coredumper

When sending the SIGUSR2 signal to the evolution-process, it will create a coredump and continue execution.

I've attached it.


-- 
Philip Van Hoof, Software Developer @ Cronos
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com
http://www.pvanhoof.be/
? p
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.806
diff -u -r1.806 configure.in
--- configure.in	12 May 2005 11:31:21 -0000	1.806
+++ configure.in	13 May 2005 11:49:39 -0000
@@ -16,6 +16,17 @@
 dnl Initialize maintainer mode
 AM_MAINTAINER_MODE
 
+dnl  *************************************************************************************************
+dnl Google coredumper
+dnl http://goog-coredumper.sourceforge.net/
+dnl  *************************************************************************************************
+
+AC_ARG_WITH(coredumper,
+    [  --with-coredumper=yes     Whether to use google coredumper [no]],
+    usecoredumper=yes, usecoredumper=no)
+
+
+
 dnl *************************************************************************************************
 dnl Base Version
 dnl
@@ -1086,6 +1097,16 @@
 	$1_LIBS="[$]$1_LIBS $4"
 ])
 
+dnl enable coredumper
+if test "x${usecoredumper}" = "xyes"; then
+        AC_DEFINE(COREDUMPER, 1, [Whether to use google coredumper)])
+	COREDUMPER_CFLAGS=""
+	COREDUMPER_LIBS="-lcoredumper"
+else
+	COREDUMPER_CFLAGS=""
+	COREDUMPER_LIBS=""
+fi
+
 dnl enable USE_GTKFILECHOOSER if gtk version is > 2.4.0
 AC_ARG_ENABLE(file-chooser, [  --enable-file-chooser    Enable the usage of the GtkFileChooser in place of the GtkFileSelection dialog], enable_file_chooser="$enableval", enable_file_chooser="yes")
 if test "x$enable_file_chooser" = "xyes"; then
@@ -1179,7 +1200,7 @@
 
 dnl --- evolution (shell) flags
 
-EVO_SET_COMPILE_FLAGS(SHELL, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 >= $BONOBOUI_REQUIRED gal-$GAL_PACKAGE >= $GAL_REQUIRED libglade-2.0 gnome-vfs-2.0 libgtkhtml-$GTKHTML_PACKAGE >= $GTKHTML_REQUIRED)
+EVO_SET_COMPILE_FLAGS(SHELL, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 >= $BONOBOUI_REQUIRED gal-$GAL_PACKAGE >= $GAL_REQUIRED libglade-2.0 gnome-vfs-2.0 libgtkhtml-$GTKHTML_PACKAGE >= $GTKHTML_REQUIRED, $COREDUMPER_CFLAGS, $COREDUMPER_LIBS)
 AC_SUBST(SHELL_CFLAGS)
 AC_SUBST(SHELL_LIBS)
 
@@ -1187,7 +1208,7 @@
 
 EVOLUTION_ADDRESSBOOK_DEPS="gconf-2.0 libbonoboui-2.0 >= $BONOBOUI_REQUIRED libglade-2.0 gal-$GAL_PACKAGE >= $GAL_REQUIRED libgnomeui-2.0 libgnome-2.0 libgnomecanvas-2.0 gnome-vfs-2.0 libgnomeprintui-2.2 libgtkhtml-$GTKHTML_PACKAGE >= $GTKHTML_REQUIRED libebook-$EDS_PACKAGE >= $EDS_REQUIRED libedataserverui-$EDS_PACKAGE >= $EDS_REQUIRED camel-$EDS_PACKAGE"
 
-EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS)
+EVO_SET_COMPILE_FLAGS(EVOLUTION_ADDRESSBOOK, $EVOLUTION_ADDRESSBOOK_DEPS, $COREDUMPER_CFLAGS, $COREDUMPER_LIBS)
 AC_SUBST(EVOLUTION_ADDRESSBOOK_CFLAGS)
 AC_SUBST(EVOLUTION_ADDRESSBOOK_LIBS)
 
@@ -1211,7 +1232,7 @@
 AC_SUBST(LIBSOUP_CFLAGS)
 AC_SUBST(LIBSOUP_LIBS)
 
-EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-$GAL_PACKAGE >= $GAL_REQUIRED libglade-2.0 gnome-vfs-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 gnome-vfs-module-2.0 libgtkhtml-$GTKHTML_PACKAGE >= $GTKHTML_REQUIRED libebook-$EDS_PACKAGE >= $EDS_REQUIRED libecal-$EDS_PACKAGE >= $EDS_REQUIRED libedataserverui-$EDS_PACKAGE >= $EDS_REQUIRED)
+EVO_SET_COMPILE_FLAGS(EVOLUTION_CALENDAR, libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 gal-$GAL_PACKAGE >= $GAL_REQUIRED libglade-2.0 gnome-vfs-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 gnome-vfs-module-2.0 libgtkhtml-$GTKHTML_PACKAGE >= $GTKHTML_REQUIRED libebook-$EDS_PACKAGE >= $EDS_REQUIRED libecal-$EDS_PACKAGE >= $EDS_REQUIRED libedataserverui-$EDS_PACKAGE >= $EDS_REQUIRED, $COREDUMPER_CFLAGS, $COREDUMPER_LIBS)
 AC_SUBST(EVOLUTION_CALENDAR_CFLAGS)
 AC_SUBST(EVOLUTION_CALENDAR_LIBS)
 
@@ -1223,7 +1244,7 @@
 
 dnl --- evolution-mail flags
 
-EVO_SET_COMPILE_FLAGS(EVOLUTION_MAIL, camel-provider-$EDS_PACKAGE libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 >= $BONOBOUI_REQUIRED gal-$GAL_PACKAGE >= $GAL_REQUIRED libglade-2.0 gnome-vfs-module-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-$GTKHTML_PACKAGE >= $GTKHTML_REQUIRED libxml-2.0 bonobo-activation-2.0 gthread-2.0 gconf-2.0 $mozilla_nss libebook-$EDS_PACKAGE >= $EDS_REQUIRED libedataserverui-$EDS_PACKAGE >= $EDS_REQUIRED)
+EVO_SET_COMPILE_FLAGS(EVOLUTION_MAIL, camel-provider-$EDS_PACKAGE libgnome-2.0 libgnomeui-2.0 libbonoboui-2.0 >= $BONOBOUI_REQUIRED gal-$GAL_PACKAGE >= $GAL_REQUIRED libglade-2.0 gnome-vfs-module-2.0 libgnomeprint-2.2 libgnomeprintui-2.2 libgtkhtml-$GTKHTML_PACKAGE >= $GTKHTML_REQUIRED libxml-2.0 bonobo-activation-2.0 gthread-2.0 gconf-2.0 $mozilla_nss libebook-$EDS_PACKAGE >= $EDS_REQUIRED libedataserverui-$EDS_PACKAGE >= $EDS_REQUIRED, $COREDUMPER_CFLAGS, $COREDUMPER_LIBS)
 AC_SUBST(EVOLUTION_MAIL_CFLAGS)
 AC_SUBST(EVOLUTION_MAIL_LIBS)
 
Index: shell/main.c
===================================================================
RCS file: /cvs/gnome/evolution/shell/main.c,v
retrieving revision 1.169
diff -u -r1.169 main.c
--- shell/main.c	12 May 2005 13:11:21 -0000	1.169
+++ shell/main.c	13 May 2005 11:49:45 -0000
@@ -24,6 +24,10 @@
 #include <config.h>
 #endif
 
+#ifdef COREDUMPER
+#include <google/coredumper.h>
+#endif
+
 #include "e-util/e-dialog-utils.h"
 #include "e-util/e-gtk-utils.h"
 #include "e-util/e-bconf-map.h"
@@ -464,6 +468,16 @@
 	g_static_mutex_lock (&segv_mutex);
 }
 
+#ifdef COREDUMPER
+static void
+write_core_dump (int sig)
+{
+	gchar *coredump_file = g_build_filename (g_get_home_dir (), "evolution.coredumper.coredump", NULL);
+	WriteCoreDump (coredump_file);
+	g_free (coredump_file);
+}
+#endif
+
 int
 main (int argc, char **argv)
 {
@@ -505,6 +519,10 @@
 	const char **args;
 	char *evolution_directory;
 	GList *icon_list;
+
+#ifdef COREDUMPER
+	signal(SIGUSR2, write_core_dump);
+#endif
 
 	/* Make ElectricFence work.  */
 	free (malloc (10));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]