debug-logging (-d) totally didn't work when one Valgrindified process
exec's another.  This commit fixes it.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@3818 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/m_debuglog.c b/coregrind/m_debuglog.c
index 517afd2..8c47ccc 100644
--- a/coregrind/m_debuglog.c
+++ b/coregrind/m_debuglog.c
@@ -449,8 +449,8 @@
 
 static Int loglevel = 0;
 
-/* EXPORTED */
 /* Module startup. */
+/* EXPORTED */
 void VG_(debugLog_startup) ( Int level, HChar* who )
 {
    if (level < 0)  level = 0;
@@ -462,6 +462,16 @@
                  who, loglevel);
 }
 
+/* Get the logging threshold level, as set by the most recent call to
+   VG_(debugLog_startup), or zero if there have been no such calls so
+   far. */
+/* EXPORTED */
+Int VG_(debugLog_getLevel) ( void )
+{
+   return loglevel;
+}
+
+
 /* ------------ */
 
 typedef