Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d95ce8ce
Commit
d95ce8ce
authored
Sep 18, 2002
by
Dimitrie O. Paun
Committed by
Alexandre Julliard
Sep 18, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update debug channel usage in DEVELOPER-HINTS.
Remove references to obsolete dirs.
parent
df28ddf3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
31 deletions
+20
-31
DEVELOPERS-HINTS
DEVELOPERS-HINTS
+20
-31
No files found.
DEVELOPERS-HINTS
View file @
d95ce8ce
...
...
@@ -133,7 +133,6 @@ Tools:
Binary loader specific directories:
-----------------------------------
debugger/ - built-in debugger
if1632/ - relay code
miscemu/ - hardware instruction emulation
graphics/win16drv/ - Win16 printer driver
...
...
@@ -144,7 +143,6 @@ Winelib specific directories:
-----------------------------
library/ - Required code for programs using Winelib
libtest/ - Small samples and tests
programs/ - Extended samples / system utilities
...
...
@@ -296,10 +294,8 @@ Debug channels
--------------
If you need to create a new debug channel, just add the
DECLARE_DEBUG_CHANNEL to your .c file(s) and rerun
tools/make_debug. When sending out your patch, you don't need to
provide neither ./configure nor the ./include/debugdefs.h diffs. Just
indicate that those files need to be regenerated.
WINE_DEFAULT_DEBUG_CHANNEL to your .c file(s), and use them.
All the housekeeping will happen automatically.
Resources
---------
...
...
@@ -514,37 +510,31 @@ DEBUG MESSAGES
To display a message only during debugging, you normally write something
like this:
TRACE(
win,
"abc..."); or
FIXME(
win,
"abc..."); or
WARN(
win,
"abc..."); or
ERR(
win,
"abc...");
TRACE("abc..."); or
FIXME("abc..."); or
WARN("abc..."); or
ERR("abc...");
depending on the seriousness of the problem. (documentation/degug-msgs
explains when it is appropriate to use each of them)
These macros are defined in include/debug.h. The macro-definitions are
generated by the shell-script tools/make_debug. It scans the source
code for symbols of this forms and puts the necessary macro
definitions in include/debug.h and include/debugdefs.h. These macros
test whether the debugging "channel" associated with the first
argument of these macros (win in the above example) is enabled and
thus decide whether to actually display the text. In addition you can
change the types of displayed messages by supplying the "-debugmsg"
option to Wine. If your debugging code is more complex than just
printf, you can use the symbols TRACE_ON(xxx), WARN_ON(xxx),
ERR_ON(xxx) and FIXME_ON(xxx) as well. These are true when channel xxx
is enabled, either permanent or in the command line. Thus, you can
write:
if(TRACE_ON(win))DumpSomeStructure(&str);
explains when it is appropriate to use each of them). You need to declare
the debug channel name at the top of the file (after the includes) using
the WINE_DEFAULT_DEBUG_CHANNEL macro, like so:
WINE_DEFAULT_DEBUG_CHANNEL(win);
If your debugging code is more complex than just printf, you can use
the macros:
TRACE_ON(xxx), WARN_ON(xxx), ERR_ON(xxx) and FIXME_ON(xxx)
to test if the given channel is enabled. Thus, you can write:
if (TRACE_ON(win)) DumpSomeStructure(&str);
Don't worry about the inefficiency of the test. If it is permanently
disabled (that is TRACE_ON(win) is 0 at compile time), the compiler will
eliminate the dead code.
You have to start tools/make_debug only if you introduced a new macro,
e.g. TRACE(win32).
For more info about debugging messages, read:
documentation/debug-msgs
...
...
@@ -561,4 +551,3 @@ MORE INFO
3. In 1993 Dr. Dobbs Journal published a column called "Undocumented Corner".
4. You might want to check out BYTE from December 1983 as well :-)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment