[evolution-patches] Google coredumper support
- From: Philip Van Hoof <spamfrommailing freax org>
- To: evolution-patches lists ximian com
- Cc: Rodrigo Moya <rodrigo novell com>, JP Rosevear <jpr novell com>
- Subject: [evolution-patches] Google coredumper support
- Date: Thu, 24 Mar 2005 21:36:42 +0100
More information
http://goog-coredumper.sourceforge.net/
Using:
kill -USR2 `pidof evolution-2.2`
[ play more with evo ]
kill -9 `pidof evolution-2.2`
gdb /opt/evo/bin/evolution-2.2 $HOME/evolution.coredumper.core
--
Philip Van Hoof, Software Developer @ Cronos
home: me at freax dot org
gnome: pvanhoof at gnome dot org
work: philip dot vanhoof at cronos dot be
junk: philip dot vanhoof at gmail dot com
http://www.freax.be, http://www.freax.eu.org
|
Index: configure.in
===================================================================
RCS file: /cvs/gnome/evolution/configure.in,v
retrieving revision 1.793
diff -u -r1.793 configure.in
--- configure.in 21 Mar 2005 16:29:34 -0000 1.793
+++ configure.in 24 Mar 2005 20:32:58 -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
@@ -1088,6 +1099,16 @@
$1_LIBS="$EVOLUTION_LIBS $extra_libs"
])
+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
@@ -1181,7 +1202,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)
@@ -1189,7 +1210,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)
@@ -1204,7 +1225,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)
@@ -1216,7 +1237,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.167
diff -u -r1.167 main.c
--- shell/main.c 21 Mar 2005 13:57:38 -0000 1.167
+++ shell/main.c 24 Mar 2005 20:32:59 -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"
@@ -462,6 +466,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)
{
@@ -503,6 +517,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]