You can take a look at msdn
http://msdn2.microsoft.com/en-us/library/ms797198.aspx
How do I generate trace messages from a header file?
To generate trace messages from source files with file name extensions
other than .c, .c++, .cpp, and .cxx, add the -ext parameter to the
RUN_WPP macro that invokes the Windows software trace preprocessor.
For example, to generate traces from .c and .h files, use the following
statement:
RUN_WPP=$(SOURCES) -km -ext:.c.h
The -ext parameter specifies the file types that WPP recognizes as
source files. WPP ignores files with a different file name extension. By
default, WPP recognizes only .c, .c++, .cpp, and .cxx files.
In versions of Windows prior to Windows Vista because the values of this
parameter are case-sensitive, you must list all cases. For example:
RUN_WPP=$(SOURCES) -km -ext:.c.C.h.H
Also, if the header file has the same name as another source file, add
the -preserveext parameter to the RUN_WPP macro. For example:
RUN_WPP=$(SOURCES) -km -ext:.c.C.h.H -preserveext:.c.h
The -preserveext parameter preserves the specified file name extensions
when creating the names of trace message header (.tmh) files. This
parameter prevents WPP from creating multiple TMH files with the same
name. By default, WPP uses only the .tmh file name extension, such as
tracedrv.tmh. With the -preserveext parameter, the files are instead
named tracedrv.c.tmh and tracedrv.h.tmh.
For a complete list of the optional parameters for RUN_WPP, see WPP
Preprocessor
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@brainboxes.com
Sent: Wednesday, July 11, 2007 5:50 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] WPP tracing from header files
Hello
We have a C++ driver that needs to generate WPP traces from a
header-file-only class implementation. I am getting nowhere…
RUN_WPP in the sources file traverses the list of sources=… entries to
generate the appropriate .tmh files for each sources file. Header files
are not usually part of the sources list, so I can’t see how the .tmh
files are supposed to be generated. Please correct me if I am wrong.
What strikes me is that RUN_WPP has a ‘-ext:’ switch, which at least in
theory allows .h files to be passed to tracewpp.exe for processing
(internally done by RUN_WPP). This kind of contradicts having no header
files in sources… I have tried it by the way, but I could not see any
change of behaviour at all when specifying this switch or not.
Any help would be much appreciated.
Christian
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer