spy.c in debug output

Dimitrie O. Paun dpaun at rogers.com
Mon Jan 3 11:22:31 CST 2005

On Mon, Jan 03, 2005 at 03:19:50PM +0100, Alexandre Julliard wrote:
> You can also simply turn on the +message channel and you get nice
> traces for all the window procs. I don't think there's much point in
> duplicating that functionality inside the window procs themselves.

Unfortunately, it's not that simple. If it were, there wouldn't be
a point in having any tracing functions in our window procs. Thing is,
then I'm debugging say listview, I don't want to turn +message on,
it dumps way too much information. For this reason, I have trace
inside the LISTVIEW_WindowProc() (and this is true for _all_ window
procs, BTW). It would be a lot more useful if that trace would be
printed in a decoded manner, as it will eliminate a lot of duplicated
effort of decoding that info in the internal functions.

What I mean is that the typical pattern is:

    TRACE("(%x, %ld, %ld\n", msg, wParam, lParam);

       case MSG_ABC:
           return XYZ_ABC(msg, wParam, lParam);

INT XYZ_ABC(msg, wParam, lParam)
    TRACE("print decoded w/lParam, often incomplete 'casuse it's too hard\n", wParam, lParam);

All this would be unnecessary, if the trace in the XYZ_WindowProc() 
did the right thing.


More information about the wine-devel mailing list