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

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

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

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

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

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

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

RUN_WPP=$(SOURCES) \
-km -dll\
-func:Debug(LEVEL, (MSG,...))

The parser doesn't like space after the comma in the Debug function
definition. I got burnt by that several times. Try the following and see if
it works.

RUN_WPP=$(SOURCES) \
-km -dll\
-func:Debug(LEVEL,(MSG,...))

--

-Eliyas
This posting is provided "AS IS" with no warranties, and confers no rights.

"Doron Holan" wrote in message
news:xxxxx@ntdev...

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) <br> -km -dll<br> -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 <br> WPP_DEFINE_CONTROL_GUID(MY_WPP_GUID, <br> (F60C08B3,9502,4245,9B5F,E402C54B1155), <br> WPP_DEFINE_BIT(DEBUG_INIT )<br> 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) <br>-km<br>-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 <br>WPP_DEFINE_CONTROL_GUID(MY_WPP_GUID, <br>(F60C08B3,9502,4245,9B5F,E402C54B1155), <br>WPP_DEFINE_BIT(DEBUG_INIT )<br>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

I know that it’s going to be in the next NT Insider, but I wonder if
someone would tell me how to set up WPP under Windows 2000. I have it
working under windows XP.

Also, how to enable tracing in the debugger would be nice.

Some comments on the article

The article says to add this to the sources

RUN_WPP=$(SOURCES) \

-km\

-func:DrvDebugPrint(LEVEL, (MSG,.))

If you notice, there is a space between LEVEL, (MSG,.))

The preprocessor doesn’t like that (and doesn’t tell you) and will
generate compile errors. Removing the space works. LEVEL,(MSG,.))

For C++ drivers it appears to need the -dll param so it becomes

RUN_WPP=$(SOURCES) \

-km -dll\

-func:DrvDebugPrint(LEVEL,(MSG,.))

Also for C++, the

#include “myfile.tmh”

should be wrapped in an extern “C” like so

extern “C” {

#include “myfile.tmh”

}

As a side note, you shouldn’t print pointers as a long!

Debug(DEBUG_INIT,(“Bad Pointer passed!! %08x\n”,MyPointer));

Will generate a warning about types. While not clear, the solution is
to use %p instead.

Debug(DEBUG_INIT,(“Bad Pointer passed!! %p\n”,MyPointer));

Thanks,

Rob

Server2003 DDK toaster sample (toaster\func\featured2) demonstrates how to do tracing in XP and Win2K. Since we recently found couple of bugs in the Win2K tracing template shipped in the Server2003 DDK, I don’t suggest anybody implement Win2K tracing in their production driver until the next revision of DDK is released. A special WinHEC DDK given to the attendees of WinHEC 2003 in few weeks will have all the fixes.


-Eliyas
This posting is provided “AS IS” with no warranties, and confers no rights.

“Rob Green” wrote in message news:xxxxx@ntdev…
I know that it’s going to be in the next NT Insider, but I wonder if someone would tell me how to set up WPP under Windows 2000. I have it working under windows XP.

Also, how to enable tracing in the debugger would be nice.

Some comments on the article

The article says to add this to the sources

RUN_WPP=$(SOURCES) <br>
-km<br>
-func:DrvDebugPrint(LEVEL, (MSG,.))

If you notice, there is a space between LEVEL, (MSG,.))

The preprocessor doesn’t like that (and doesn’t tell you) and will generate compile errors. Removing the space works. LEVEL,(MSG,.))

For C++ drivers it appears to need the -dll param so it becomes

RUN_WPP=$(SOURCES) <br>
-km -dll<br>
-func:DrvDebugPrint(LEVEL,(MSG,.))

Also for C++, the

#include “myfile.tmh”

should be wrapped in an extern “C” like so

extern “C” {

#include “myfile.tmh”

}

As a side note, you shouldn’t print pointers as a long!

Debug(DEBUG_INIT,(“Bad Pointer passed!! %08x\n”,MyPointer));

Will generate a warning about types. While not clear, the solution is to use %p instead.

Debug(DEBUG_INIT,(“Bad Pointer passed!! %p\n”,MyPointer));

Thanks,

Rob

Would this WinHEC 2003 DDK is it released on the web or for MSDN users?

-Srin.

-----Original Message-----
From: Eliyas Yakub [mailto:xxxxx@microsoft.com]
Sent: Monday, April 28, 2003 11:16 PM
To: NT Developers Interest List
Subject: [ntdev] Re: Without a trace

Server2003 DDK toaster sample (toaster\func\featured2) demonstrates how
to do tracing in XP and Win2K. Since we recently found couple of bugs in
the Win2K tracing template shipped in the Server2003 DDK, I don’t
suggest anybody implement Win2K tracing in their production driver until
the next revision of DDK is released. A special WinHEC DDK given to the
attendees of WinHEC 2003 in few weeks will have all the fixes.


-Eliyas
This posting is provided “AS IS” with no warranties, and confers no
rights.

“Rob Green” wrote in message news:xxxxx@ntdev…

I know that it’s going to be in the next NT Insider, but I wonder if
someone would tell me how to set up WPP under Windows 2000. I have it
working under windows XP.

Also, how to enable tracing in the debugger would be nice.

Some comments on the article

The article says to add this to the sources

RUN_WPP=$(SOURCES) <br>
-km<br>
-func:DrvDebugPrint(LEVEL, (MSG,…))

If you notice, there is a space between LEVEL, (MSG,…))

The preprocessor doesn’t like that (and doesn’t tell you) and will
generate compile errors. Removing the space works. LEVEL,(MSG,…))

For C++ drivers it appears to need the -dll param so it becomes

RUN_WPP=$(SOURCES) <br>
-km -dll<br>
-func:DrvDebugPrint(LEVEL,(MSG,…))

Also for C++, the

#include “myfile.tmh”

should be wrapped in an extern “C” like so

extern “C” {

#include “myfile.tmh”

}

As a side note, you shouldn’t print pointers as a long!

Debug(DEBUG_INIT,(“Bad Pointer passed!! %08x\n”,MyPointer));

Will generate a warning about types. While not clear, the solution is
to use %p instead.

Debug(DEBUG_INIT,(“Bad Pointer passed!! %p\n”,MyPointer));

Thanks,

Rob


You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to xxxxx@lists.osr.com