I will try to poke around and try to repro it. A couple of notes though .... You don't need to extern "C" the WPP #defines and you are missing a "" after WPP_DEFINE_BIT(DEBUG_THREAD ) to continue the macro to the next line (don't know if that is a retype error or if you truly copy & pasted this). Also, make sure the previous #define for Debug has been removed.
D
This posting is provided "AS IS" with no warranties, and confers no rights.
-----Original Message-----
From: Rob Green [mailto:xxxxx@cdp.com]
Sent: Wednesday, April 23, 2003 4:24 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Without a trace
That's my debug statement.
#60: Debug(DEBUG_INIT,("DoUnlink: Entered with
master=%p\n",master));
I didn't quote the entire build log, but its complaining about the bits I set, and the function I am trying to use for debug logging. See below for the debug log its replacing and the bits I am specifying for WPP.
Thanks,
Rob
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, April 23, 2003 6:55 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Without a trace
What is the code at line 60? DEBUG_INIT is not referenced anywhere in any of my TMH files nor any of the wpp tpl files.
D
This posting is provided "AS IS" with no warranties, and confers no rights.
-----Original Message-----
From: Rob Green [mailto:xxxxx@cdp.com]
Sent: Wednesday, April 23, 2003 3:47 PM
To: NT Developers Interest List
Subject: [ntdev] RE: Without a trace
Ok, that got that working, but its now giving me
atomic.cpp(60) : error C2065: 'DEBUG_INIT' : undeclared identifier
atomic.cpp(60) : error C3861: 'Debug': identifier not found, even with argument-dependent lookup
Do I need to define any new defines in my sources file such as WPP_TRACE?
Sources
RUN_WPP=$(SOURCES) \
-km -dll\
-func:Debug(LEVEL, (MSG,...))
top of every source file
#include "precomp.h"
extern "C" {
#include "atomic.tmh" // or whatever the name of the file is
}
=====
in precomp.h
extern "C" {
#define WPP_CONTROL_GUIDS \
WPP_DEFINE_CONTROL_GUID(MY_WPP_GUID, \
(F60C08B3,9502,4245,9B5F,E402C54B1155), \
WPP_DEFINE_BIT(DEBUG_INIT )\
WPP_DEFINE_BIT(DEBUG_THREAD )
)
}
The macro it replaced
#define Debug(level,x) if ((DebugLevel & (level)) == (level)) DebugPrintSave x
Thanks,
Rob
-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Doron Holan
Sent: Wednesday, April 23, 2003 12:28 AM
To: NT Developers Interest List
Subject: [ntdev] RE: Without a trace
Add -dll to the RUN_WPP directive in sources. This is most likely due to how WPP declares global variables and that you are using C++ as your language for your driver; you should also put the #include of the tmh inside of an extern "C" { } if you are using c++.
D
This posting is provided "AS IS" with no warranties, and confers no rights.
From: Rob Green [mailto:xxxxx@cdp.com]
Sent: Tuesday, April 22, 2003 6:50 PM
To: NT Developers Interest List
And the error I am getting
?
atomic.obj : warning LNK4210: .CRT section exists; there may be unhandled static initializers or terminators
?
and the entry from the object file
SECTION HEADER #70
.CRT$XCU name
?????? 0 physical address
?????? 0 virtual address
?????? 4 size of raw data
??? 85B1 file pointer to raw data
??? 85B5 file pointer to relocation table
?????? 0 file pointer to line numbers
?????? 1 number of relocations
?????? 0 number of line numbers
C0301040 flags
???????? Initialized Data
???????? Communal; sym= _$S2
???????? 4 byte align
???????? Read Write
?
RAW DATA #70
? 00000000: 00 00 00 00??? ??????????????????????????????????....
?
RELOCATIONS #70
??????????????????????????????????????????????? Symbol??? Symbol
?Offset??? Type????????????? Applied To???????? Index???? Name
?--------? ----------------? -----------------? --------? ------
?00000000? DIR32????????????????????? 00000000?????? 211? _$E1
?
Thanks,
Rob
?
-----Original Message-----
From: Rob Green [mailto:xxxxx@cdp.com]
Sent: Tuesday, April 22, 2003 9:47 PM
To: NT Developers Interest List (xxxxx@lists.osr.com)
Subject: Without a trace
?
I am trying to implement wpp tracing in one of my drivers, however link keeps complaining..? anyone have any ideas:
?
?
Sources
RUN_WPP=$(SOURCES) \
??????????? -km\
??????????? -func:Debug(LEVEL, (MSG,...))
?
top of every source file
#include "precomp.h"
#include "atomic.tmh" // or whatever the name of the file is
?
?
in precomp.h
#define WPP_CONTROL_GUIDS?????????????????????????????????? \
?? WPP_DEFINE_CONTROL_GUID(MY_WPP_GUID,????????????????????? \
?????? (F60C08B3,9502,4245,9B5F,E402C54B1155),???????? \
?????? WPP_DEFINE_BIT(DEBUG_INIT???? ??????)\
?????? WPP_DEFINE_BIT(DEBUG_THREAD???????? )
??? )
?
The macro it replaced
?? #define Debug(level,x) if ((DebugLevel & (level)) == (level)) DebugPrintSave x
?
?
!!! Help !!!
?
Thanks,
Rob
?
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@cdp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@cdp.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to xxxxx@lists.osr.com