At 01:34 PM 12/10/00 +0100, you wrote:
<snip>
>So I wanted to run it "-debugmsg +all" and see what happens. But before I
>get to the point where i'm interested it produces a lot of data. It filled
>up my 2GB free harddiskspace and I still didn't get what I wanted.
>
>I think we need a way to turn off and on debug channels while the program
>is runninhg not just as parameters to wine. I guess this is something one
>should add to the server and create a small program that tells the servet
>to turn on or off channels.

I don't see any simple  way to turn on and off specific debug channels, but
the good new about the dll separation is that my old deferred trace patch 
is now way more easy to implement in a clean way; try the attached
patch and give me some feedback before I send it to wine-patches
(with a slight change; I don't like to modify headers when I do testing and
I'll of course use replace my magic numeric values by symbolic ones
before sending it)

Gerard
diff -x*.so -x*.1.0 -x*.status -xwine -xMakefile* -x*.a -x*.rej -xEntries -x*.log 
-x*.s -x*.o -x*.sym -ru wine/dlls/ntdll/debugtools.c wine2/dlls/ntdll/debugtools.c
--- wine/dlls/ntdll/debugtools.c        Sat Nov 25 04:09:31 2000
+++ wine2/dlls/ntdll/debugtools.c       Sun Dec 10 16:51:54 2000
@@ -231,8 +231,21 @@
                  const char *function, const char *format, ... )
 {
     static const char *classes[__DBCL_COUNT] = { "fixme", "err", "warn", "trace" };
+    static BOOL deferred = FALSE, debugEnabled = TRUE;
     va_list valist;
     int ret = 0;
+
+    if (cls >= 1000)
+    {
+        if (cls == 1000) deferred = TRUE;
+        if ((deferred) && (cls == 1001))
+            debugEnabled = !debugEnabled;
+        else
+            debugEnabled = FALSE;
+        return debugEnabled;
+    }
+    if (!debugEnabled)
+        return 0;
 
     va_start(valist, format);
     if (cls < __DBCL_COUNT)
diff -x*.so -x*.1.0 -x*.status -xwine -xMakefile* -x*.a -x*.rej -xEntries -x*.log 
-x*.s -x*.o -x*.sym -ru wine/misc/options.c wine2/misc/options.c
--- wine/misc/options.c Thu Dec  7 08:25:19 2000
+++ wine2/misc/options.c        Sun Dec 10 16:41:22 2000
@@ -62,6 +62,7 @@
 static void do_debugmsg( const char *arg );
 static void do_desktop( const char *arg );
 static void do_display( const char *arg );
+static void do_deferred( const char *arg );
 static void do_dll( const char *arg );
 static void do_help( const char *arg );
 static void do_language( const char *arg );
@@ -97,6 +98,8 @@
       "--version,-v     Display the Wine version" },
     { "winver",       0, 1, 1, VERSION_ParseWinVersion,
       "--winver         Version to imitate 
(win95,nt40,win31,nt2k,win98,nt351,win30,win20)" },
+    { "dt",           0, 0, 1, do_deferred,
+      "--dt             Defer trace until hit Alt+F12" }, 
     { NULL,           0, 0, 0, NULL, NULL }  /* terminator */
 };
 
@@ -127,6 +130,11 @@
     Options.display = xstrdup( arg );
 }
 
+static void do_deferred( const char *arg )
+{
+    wine_dbg_log(1000,NULL,NULL," ");
+}
+    
 static void do_dll( const char *arg )
 {
     if (Options.dllFlags)
diff -x*.so -x*.1.0 -x*.status -xwine -xMakefile* -x*.a -x*.rej -xEntries -x*.log 
-x*.s -x*.o -x*.sym -ru wine/windows/defwnd.c wine2/windows/defwnd.c
--- wine/windows/defwnd.c       Fri Dec  8 09:06:41 2000
+++ wine2/windows/defwnd.c      Sun Dec 10 16:47:34 2000
@@ -545,6 +545,11 @@
              SendMessage16( WIN_GetTopParent(wndPtr->hwndSelf),
                              WM_SYSCOMMAND, SC_KEYMENU, 0L );
        iMenuSysKey = iF10Key = 0;
+        if ((wParam == VK_F12) && (GetKeyState(VK_MENU) & 0x8000))
+        {
+              if (wine_dbg_log(1001,NULL,NULL," "))
+                   WIN_WalkWindows((HWND)NULL, 0);
+        }         
         break;
 
     case WM_SYSCHAR:



Reply via email to