时事政治教育内容:DebugChannels
来源:百度文库 编辑:偶看新闻 时间:2024/04/28 00:53:31
WINEDEBUG is an environment variable that turns debugging messages on or off.
Syntax
WINEDEBUG=[class][+/-]channel[,[class2][+/-]channel2]
class is optional and can be one of the following: err, warn, fixme, or trace. If class is not specified, all debugging messages for the specified channel are turned on. Each channel will print messages about a particular component of Wine. The following character can be either + or - to switch the specified channel on or off respectively. If there is no class part before it, a leading + can be omitted. Note that spaces are not allowed any where in the string.
channel specifies which debug channel to turn on or off. For complete list of channels run this command in the source dir
grep -r --include='*.c' --include='*.h' 'WINE_\(DEFAULT\|DECLARE\)_DEBUG_CHANNEL' dlls/ programs/
And with some more work we have sorted and formatted list in BASH (you may want to adjust number 26 near the end of this composite to match your indentation taste):
for modname in $(find dlls/ programs/ -mindepth 1 -type d | sort); do echo $(grep -rE --include='*.[ch]' '^WINE_(DEFAULT|DECLARE)_DEBUG_CHANNEL' $modname | awk -F "[()]" '{print $2}' | sort | uniq) | awk -v modname=$modname '{if (NF>0) printf("%-*s%s\n", 26, modname": ", $0)}';done
List of Debug Channels
accel
acledit
actctx
activeds
actxprxy
adpcm
advapi
advpack
alsa
amstream
animate
appbar
appwizcpl
aspi
atl
atom
avicap
avifile
bidi
bitblt
bitmap
browseui
button
cabinet
capi
cards
caret
cdrom
class
clipboard
clipping
clusapi
cmd
cmdlgtst
combo
comboex
comm
commctrl
commdlg
compstui
computername
console
coreaudio
cred
credui
crtdll
crypt
cryptasn
cryptdlg
cryptdll
cryptnet
cryptui
ctapi32
curses
cursor
d3d
d3d10
d3d7
d3d8
d3d9
d3d_caps
d3d_constants
d3d_decl
d3d_draw
d3drm
d3d_shader
d3d_surface
d3d_texture
d3dx
d3dx8
d3dxof
datetime
dbghelp
dbghelp_coff
dbghelp_dwarf
dbghelp_msc
dbghelp_stabs
dbghelp_symt
dc
dciman
ddeml
ddraw
ddraw_thunk
debug_buffer
debugstr
devenum
dialog
dinput
dll
dma
dmband
dmcompos
dmdump
dmfile
dmfileraw
dmime
dmloader
dmscript
dmstyle
dmsynth
dmusic
dmusic32
dnsapi
dosmem
dpa
dplay
dpnet
dpnhpast
driver
ds
dsa
dsalsa
dscapture
dsound
dsound3d
dssenh
dswave
dwmapi
dxdiag
edit
eject
enhmetafile
environ
event
eventlog
exec
explorer
faultrep
fiber
file
fixup
font
fps
fusion
g711
gdi
gdiplus
global
glu
gpkcsp
graphics
handle
header
heap
hid
hlink
hnetcfg
hook
hotkey
htmlhelp
iccvid
icm
icmp
icon
imagehlp
imagelist
imm
imports
inetcomm
inetmib1
infosoft
initpki
inkobj
inseng
int
int21
int31
io
ipaddress
iphlpapi
itircl
itss
jack
joystick
jscript
key
keyboard
listbox
listview
loaddll
local
localspl
localui
lsa
mapi
mci
mciavi
mcicda
mcimidi
mciwave
mdi
menu
menubuilder
message
metafile
midi
mixer
mlang
mmaux
mmio
mmsys
mmtime
module
monthcal
mountmgr
mpeg3
mpr
mprapi
msacm
mscat
mscms
mscoree
msdmo
msftedit
msg
msgbox
mshtml
msi
msidb
msiexec
msimg32
msimtf
msisip
msisys
msnet
msrle32
mssip32
mstask
msvcirt
msvcr71
msvcrt
msvcrt40
msvidc32
msvideo
mswsock
msxml
nativefont
nddeapi
netapi32
netbios
newdev
nls
nonclient
ntdll
ntdsapi
ntlm
ntoskrnl
ntprint
objsel
odbc
ole
oleacc
oledlg
olemalloc
olerelay
olethk32
oleview
opengl
openal32
pager
palette
pdh
pidl
powermgnt
powrprof
printui
process
profile
progress
propsheet
propsys
psapi
psdrv
pstores
qcap
qcap_v4l
qedit
qmgr
quartz
query
ras
rebar
recyclebin
reg
regedit
region
relay
resource
resutils
richedit
richedit_check
richedit_lists
richedit_style
rpc
rpcss
rundll32
sblaster
sccbase
schannel
scroll
secur32
seh
selector
sensapi
server
service
setupapi
sfc
share
shdocvw
shell
shlctrl
slbcsp
slc
snmpapi
snoop
sound
spoolss
spoolsv
start
static
statusbar
storage
stress
string
svchost
svrapi
sxs
sync
synchronous
syslevel
system
systray
tab
tape
tapi
task
text
theming
themingcombo
thread
threadpool
thunk
tid
time
toolbar
toolhelp
tooltips
trackbar
trash
treeview
twain
typelib
typelib2
uninstaller
uniscribe
updown
url
urlmon
user
userenv
uxtheme
variant
vdmdbg
ver
virtual
volume
vxd
wave
wavemap
wc_font
wgl
win
wineboot
winebrowser
winecfg
wineconsole
wine_d3d
winedbg
winedevice
winemine
winevdm
wing
winhelp
winhttp
wininet
winmm
winscard
winsock
winspool
winstation
wintab
wintab32
wintrust
wldap32
wnet
wtsapi
x11drv
x11settings
xcopy
xdg
xdnd
xrandr
xrender
xvidmode
Useful or special channels
- all -- logs everything
- heap -- logs heap functions and turns on extra checks
- message -- logs Windows messages
- msgbox -- logs the display of message boxes
- relay -- logs every cross-module function call to Wine builtin DLLs
- seh -- logs Windows exceptions (Structured Exception Handling)
- snoop -- logs every function call in native DLLs (may break them)
- synchronous -- force X11 into synchronous mode
- tid -- prepends each log message with the ID of the thread it came from
Examples
- WINEDEBUG=warn+all
- will turn on all warning messages.
- WINEDEBUG=warn+dll,+heap
- will turn on DLL warning messages and all heap messages.
- WINEDEBUG=fixme-all,warn+cursor,+relay
- will turn off all FIXME messages, turn on cursor warning messages, and turn on all relay messages (API calls).
- WINEDEBUG=+relay
will turn on all relay messages. For more control on including or excluding functions and dlls from the relay trace look into the [HKCU\Software\Wine\Debug] registry key (See UsefulRegistryKeys and example below).
Making +relay less verbose
If you're looking for a problem that happens a couple minutes into the run of an app, +relay can be too verbose. In that case, run it once, then send the log through a script like
# Make grep go fastLANG=C# Find top ten callsfreq=`grep ':Ret ' | sed 's/(.*//;s/.* //' | sort | uniq -c | sort -n | tail | awk '{print $2}' | tr '\012' ';'`cat > quiet.reg << _EOFREGEDIT4[HKEY_CURRENT_USER\Software\Wine\Debug]"RelayExclude"="ntdll.RtlEnterCriticalSection;ntdll.RtlLeaveCriticalSection;kernel32.48;kernel32.49;kernel32.94;kernel32.95;kernel32.96;kernel32.97;kernel32.98;$freq"_EOFwine regedit quiet.reg
This will tell Wine to not log the ten most frequent calls in your app, which should make your +relay log much more managable in size.
See Also
Debug_trace_toggle_key A patch to toggle tracing on and off while running an application
Environment Variables: WINEDEBUG - chapter of the Wine User Guide
WineAPI documentation - For each function the used debug channels are listed.
Bug 638 - Bug tracking documenting the debugging channel. Has a perl script to list all channels in a function.