r20367 - gnucash/trunk/src - Add additional debug markers
Geert Janssens
gjanssens at code.gnucash.org
Thu Mar 3 16:50:05 EST 2011
Author: gjanssens
Date: 2011-03-03 16:50:05 -0500 (Thu, 03 Mar 2011)
New Revision: 20367
Trac: http://svn.gnucash.org/trac/changeset/20367
Modified:
gnucash/trunk/src/bin/gnucash-bin.c
gnucash/trunk/src/gnc-module/Makefile.am
gnucash/trunk/src/gnc-module/gnc-module.c
gnucash/trunk/src/libqof/qof/guid.c
Log:
Add additional debug markers
Modified: gnucash/trunk/src/bin/gnucash-bin.c
===================================================================
--- gnucash/trunk/src/bin/gnucash-bin.c 2011-03-03 13:06:57 UTC (rev 20366)
+++ gnucash/trunk/src/bin/gnucash-bin.c 2011-03-03 21:50:05 UTC (rev 20367)
@@ -54,6 +54,9 @@
#include "engine-helpers.h"
#include "swig-runtime.h"
+/* This static indicates the debugging module that this .o belongs to. */
+static QofLogModule log_module = GNC_MOD_GUI;
+
#ifdef HAVE_GETTEXT
# include <libintl.h>
# include <locale.h>
@@ -584,11 +587,13 @@
len = sizeof(modules) / sizeof(*modules);
for (i = 0; i < len; i++)
{
+ DEBUG("Loading module %s started", modules[i].name);
gnc_update_splash_screen(modules[i].name, GNC_SPLASH_PERCENTAGE_UNKNOWN);
if (modules[i].optional)
gnc_module_load_optional(modules[i].name, modules[i].version);
else
gnc_module_load(modules[i].name, modules[i].version);
+ DEBUG("Loading module %s finished", modules[i].name);
}
if (!gnc_engine_is_initialized())
{
Modified: gnucash/trunk/src/gnc-module/Makefile.am
===================================================================
--- gnucash/trunk/src/gnc-module/Makefile.am 2011-03-03 13:06:57 UTC (rev 20366)
+++ gnucash/trunk/src/gnc-module/Makefile.am 2011-03-03 21:50:05 UTC (rev 20367)
@@ -4,6 +4,7 @@
-I${top_srcdir}/lib/libc \
-I${top_srcdir}/src \
-I${top_srcdir}/src/core-utils \
+ -I${top_srcdir}/src/libqof/qof \
${GLIB_CFLAGS} \
${GUILE_INCS}
@@ -14,6 +15,7 @@
libgnc_module_la_LIBADD = \
../core-utils/libgnc-core-utils.la \
${top_builddir}/lib/libc/libc-missing.la \
+ ${top_builddir}/src/libqof/qof/libgnc-qof.la \
${GLIB_LIBS} \
${GUILE_LIBS}
Modified: gnucash/trunk/src/gnc-module/gnc-module.c
===================================================================
--- gnucash/trunk/src/gnc-module/gnc-module.c 2011-03-03 13:06:57 UTC (rev 20366)
+++ gnucash/trunk/src/gnc-module/gnc-module.c 2011-03-03 21:50:05 UTC (rev 20367)
@@ -15,7 +15,11 @@
#endif
#include "gnc-module.h"
+#include "qof.h"
+/* This static indicates the debugging module that this .o belongs to. */
+static QofLogModule log_module = "gnc.gui";
+
static GHashTable * loaded_modules = NULL;
static GList * module_info = NULL;
@@ -429,6 +433,8 @@
GModule * gmodule;
GNCModuleInfo * modinfo;
+ ENTER("module_name: %s",module_name);
+
if (!loaded_modules)
{
gnc_module_system_init();
@@ -449,21 +455,25 @@
if (info->init_func(info->load_count))
{
info->load_count++;
+ LEAVE("module %s already loaded", module_name);
return info;
}
else
{
g_warning ("module init failed: %s", module_name);
+ LEAVE("");
return NULL;
}
}
else
{
g_warning ("module has no init func: %s", module_name);
+ LEAVE("");
return NULL;
}
/* NOTREACHED */
g_error("internal error");
+ LEAVE("");
return NULL;
}
@@ -480,6 +490,7 @@
g_warning ("Could not locate module %s interface v.%d",
module_name, iface);
}
+ LEAVE("");
return NULL;
}
@@ -511,9 +522,11 @@
g_free(info->filename);
g_free(info);
/* g_module_close(module); */
+ LEAVE("");
return NULL;
}
+ LEAVE("");
return info;
}
else
@@ -522,11 +535,13 @@
modinfo->module_filepath);
//lt_dlclose(handle);
}
+ LEAVE("");
return info;
}
g_warning ("Failed to open module %s: %s\n", module_name, g_module_error());
+ LEAVE("");
return NULL;
}
Modified: gnucash/trunk/src/libqof/qof/guid.c
===================================================================
--- gnucash/trunk/src/libqof/qof/guid.c 2011-03-03 13:06:57 UTC (rev 20366)
+++ gnucash/trunk/src/libqof/qof/guid.c 2011-03-03 21:50:05 UTC (rev 20367)
@@ -327,6 +327,8 @@
{
size_t bytes = 0;
+ ENTER("");
+
/* Not needed; taken care of on first malloc.
* guid_memchunk_init(); */
@@ -468,6 +470,7 @@
#endif
guid_initialized = TRUE;
+ LEAVE();
}
void
More information about the gnucash-changes
mailing list