Discussion:
runtime change to WINEDEBUG output
James Hawkins
2004-08-25 21:21:53 UTC
Permalink
Hi,

Is there a way to change the trace options of WINEDEBUG during
runtime? For example, let's say I'm running an installer that
encounters a fatal error during one part of the install. I'm not
exactly sure where in the wine code base this error is occurring and
it would take forever if I set WINEDEBUG=trace+all and had to wait
till I get to the right section to find the error. If this is not a
feature we have, would it be possible to write a simple program that
will send a message to the wineserver telling it to change it's
WINEDEBUG value during runtime? I have no idea how this would be
implemented or if anyone else would actually want this feature, but if
you have any ideas let me know. Thanks.
--
James Hawkins
Robert Shearman
2004-08-25 21:29:24 UTC
Permalink
Post by James Hawkins
Hi,
Is there a way to change the trace options of WINEDEBUG during
runtime?
WINEDEBUG=trace+all wine setup.exe 2>&1 | sed '1,/Debug mark/d'

Then you just need to bring the system menu up and click on "Put 'Debug
mark' in debug log" and debugging will then start. I seem to remember
that Mike Hearn submitted a patch a while ago that did exactly what you
are asking for, but Alexandre rejected it saying that it could be done
just as easily with external programs. I just haven't figured out how yet...

Rob
Vincent Béron
2004-08-25 22:40:22 UTC
Permalink
Post by Robert Shearman
Post by James Hawkins
Hi,
Is there a way to change the trace options of WINEDEBUG during
runtime?
WINEDEBUG=trace+all wine setup.exe 2>&1 | sed '1,/Debug mark/d'
Then you just need to bring the system menu up and click on "Put 'Debug
mark' in debug log" and debugging will then start. I seem to remember
that Mike Hearn submitted a patch a while ago that did exactly what you
are asking for, but Alexandre rejected it saying that it could be done
just as easily with external programs. I just haven't figured out how yet...
ReactOS taskmgr (programs/taskmgr) can do that for any channel, although
I didn't see the "all" debug channel.

Vincent
James Hawkins
2004-08-25 23:11:13 UTC
Permalink
Post by Vincent Béron
Post by Robert Shearman
Then you just need to bring the system menu up and click on "Put 'Debug
mark' in debug log" and debugging will then start.
I'm not exactly sure what you mean by system menu. I cant remember
seeing the "Put...log" anywhere. Thankyou for your help on this
response btw.

On 25 Aug 2004 18:40:22 -0400, Vincent Béron
Post by Vincent Béron
Post by Robert Shearman
Post by James Hawkins
Hi,
Is there a way to change the trace options of WINEDEBUG during
runtime?
WINEDEBUG=trace+all wine setup.exe 2>&1 | sed '1,/Debug mark/d'
Then you just need to bring the system menu up and click on "Put 'Debug
mark' in debug log" and debugging will then start. I seem to remember
that Mike Hearn submitted a patch a while ago that did exactly what you
are asking for, but Alexandre rejected it saying that it could be done
just as easily with external programs. I just haven't figured out how yet....
ReactOS taskmgr (programs/taskmgr) can do that for any channel, although
I didn't see the "all" debug channel.
Vincent
--
James Hawkins
Vincent Béron
2004-08-25 23:25:19 UTC
Permalink
Post by James Hawkins
Post by Robert Shearman
Then you just need to bring the system menu up and click on "Put 'Debug
mark' in debug log" and debugging will then start.
I'm not exactly sure what you mean by system menu. I cant remember
seeing the "Put...log" anywhere. Thankyou for your help on this
response btw.
[snip]

I didn't see it when used in "Managed"="Y" mode, but with "Managed"="N"
the option's there (Alt-space, or the icon in the top-left corner of the
window of the app).

Vincent
James Hawkins
2004-08-25 23:34:34 UTC
Permalink
Oh ok thanks a bunch I will definitely try it out now.

On 25 Aug 2004 19:25:19 -0400, Vincent Béron
Post by Vincent Béron
Post by James Hawkins
Post by Robert Shearman
Then you just need to bring the system menu up and click on "Put 'Debug
mark' in debug log" and debugging will then start.
I'm not exactly sure what you mean by system menu. I cant remember
seeing the "Put...log" anywhere. Thankyou for your help on this
response btw.
[snip]
I didn't see it when used in "Managed"="Y" mode, but with "Managed"="N"
the option's there (Alt-space, or the icon in the top-left corner of the
window of the app).
Vincent
--
James Hawkins
James Hawkins
2004-08-26 00:32:27 UTC
Permalink
I ran WINEDEBUG=trace+all wine setup.exe 2>&1 | sed '1,/Debug mark/d'
in the terminal, and all of the debug output is being displayed
already without selecting the "Put..log" option. I switched
"Managed" to "N" at Vincent's suggestion. Any ideas?
Post by James Hawkins
Oh ok thanks a bunch I will definitely try it out now.
On 25 Aug 2004 19:25:19 -0400, Vincent Béron
Post by Vincent Béron
Post by James Hawkins
Post by Robert Shearman
Then you just need to bring the system menu up and click on "Put 'Debug
mark' in debug log" and debugging will then start.
I'm not exactly sure what you mean by system menu. I cant remember
seeing the "Put...log" anywhere. Thankyou for your help on this
response btw.
[snip]
I didn't see it when used in "Managed"="Y" mode, but with "Managed"="N"
the option's there (Alt-space, or the icon in the top-left corner of the
window of the app).
Vincent
--
James Hawkins
--
James Hawkins
Robert Shearman
2004-08-26 00:49:41 UTC
Permalink
Post by James Hawkins
I ran WINEDEBUG=trace+all wine setup.exe 2>&1 | sed '1,/Debug mark/d'
in the terminal, and all of the debug output is being displayed
already without selecting the "Put..log" option. I switched
"Managed" to "N" at Vincent's suggestion. Any ideas?
Try this instead:

WINEDEBUG=trace+all wine setup.exe 2>&1 | sed '1,/Debug mark requested/d'

It then shouldn't match against a call to the menu functions that put
the debug log option into the system menu.

Rob
James Hawkins
2004-08-26 01:27:41 UTC
Permalink
Oh ok thanks Rob I'll try it out.
Post by Robert Shearman
Post by James Hawkins
I ran WINEDEBUG=trace+all wine setup.exe 2>&1 | sed '1,/Debug mark/d'
in the terminal, and all of the debug output is being displayed
already without selecting the "Put..log" option. I switched
"Managed" to "N" at Vincent's suggestion. Any ideas?
WINEDEBUG=trace+all wine setup.exe 2>&1 | sed '1,/Debug mark requested/d'
It then shouldn't match against a call to the menu functions that put
the debug log option into the system menu.
Rob
--
James Hawkins
Mike Hearn
2004-08-26 08:37:01 UTC
Permalink
Post by James Hawkins
Oh ok thanks Rob I'll try it out.
I tend to find piping stuff through sed is too slow (but then I have
quite a slow computer). There is a patch floating around in the archives
that lets you toggle debug logging on and off using the F12 key. It
works at the level of the debug infrastructure itself so the app speeds
up noticeably when it's not doing lots of printfs.

It may have bitrotted. Alexandre wouldn't apply it, as it put policy
into the Wine core (at least, if I remember correctly).

FWIW I usually find +all traces give too much output for debugging
anything other than startup problems where you have no idea what's
wrong. Beyond a few seconds execution the logs get too big to work with,
especially if you're working blind.
Diego 'Flameeyes' Pettenò
2004-08-26 10:51:49 UTC
Permalink
Post by Mike Hearn
FWIW I usually find +all traces give too much output for debugging
anything other than startup problems where you have no idea what's
wrong. Beyond a few seconds execution the logs get too big to work with,
especially if you're working blind.
And also, as I reported on bug #2393, seems like RelayExclude doesn't work,
so the allocate/free heap and the enter/leave critical section messages
fills the output so much that it's impossible to use it for debug.
Trying to tracing ClrMamePro I'm having a log of 3Gb right after the first
window is loaded...
--
Diego "Flameeyes" Pettenò
***@users.sourceforge.net - http://flameeyes.web.ctonet.it/
Diego 'Flameeyes' Pettenò
2004-08-25 23:49:23 UTC
Permalink
Post by Vincent Béron
I didn't see it when used in "Managed"="Y" mode, but with "Managed"="N"
the option's there (Alt-space, or the icon in the top-left corner of the
window of the app).
When an app is running in Managed Mode we can access the system menu opening
the first menu (usually File) and then moving to left (so the previous
menu, which is the system menu :) ).
--
Diego "Flameeyes" Pettenò
***@users.sourceforge.net - http://flameeyes.web.ctonet.it/
Loading...