Unfortunately not they are a WPP convenience.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@NAI.com
Sent: Thursday, February 05, 2004 3:20 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] ETW?
Rob,
Thanks for your response. I already do this.
What I wanted to know is if I am using %!STATUS! Or %!IPADDR! types then
what would happen to them when I haven’t enabed WPP. Would these still
be recognized by DbgPrint?
-Srin.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Rob Green
Sent: Thursday, February 05, 2004 2:21 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] ETW?For the sources I do something similar to
!if “$(DEBUG_BUILD)” == “1”
no wpp on debug builds
!else
Enable WPP on release builds
RUN_WPP=$(SOURCES) \
-km -dll\
-gen:{km-w2k.tpl}*.tmh \
-func:Debug(LEVEL,(MSG,…))
!endif ## debugand then I set “DEBUG_BUILD” environment before doing the debug build.
Thanks,
Rob> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:bounce-166363-
> xxxxx@lists.osr.com] On Behalf Of xxxxx@NAI.com
> Sent: Thursday, February 05, 2004 5:13 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] ETW?
>
> Yes, this is what I was looking for. Do you know which byte
order it
> expects the IPAddress to be. In addition I would appreciate if you
> could tell me. 1. How to define my own types. For Example
if I want to
> define a type for printing IPADDR in a different byte order.
> 2. If I can add support for these types to DbgPrint function. Using
> SOURCES file I enable and disable WPP without changing source code.
>
> -Srin.
>
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of Ian Service
> > Sent: Thursday, February 05, 2004 1:44 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] ETW?
> >
> >
> > %!IPADDR! is that suitable?
> >
> > But if that’s not the format u want it is possible to
define a type.
> >
> > -----Original Message-----
> > From: xxxxx@lists.osr.com
> > [mailto:xxxxx@lists.osr.com] On Behalf Of
> > xxxxx@NAI.com
> > Sent: Thursday, February 05, 2004 1:23 PM
> > To: Windows System Software Devs Interest List
> > Subject: RE: [ntdev] ETW?
> >
> > I wanted something similar to print an IP Address in dotted
> > notation. If I used a macro the WPP used to choke saying
not enough
> > parameters.
> >
> > How do I print a IP address which is in network byte
order?. Right
> > now I have to do this every time I want to print an IP.
> >
> > DbgPrint((“LocalIp = %d.%d.%d.%d LocalPort = 0x%x
RemoteIp =
> > %d.%d.%d.%d RemotePort =0x%x\n”,
> > *((PUCHAR)&NboLocalIp), *((PUCHAR)&NboLocalIp + 1),
> > *((PUCHAR)&NboLocalIp + 2), *((PUCHAR)&NboLocalIp + 3),
> > NTOHS(NboLocalPort), *((PUCHAR)&NboRemoteIp),
> > *((PUCHAR)&NboRemoteIp + 1),
*((PUCHAR)&NboRemoteIp + 2),
> > *((PUCHAR)&NboRemoteIp + 3), NTOHS(NboRemotePort)));
> >
> > Similar to %!STATUS! Can I define and implement my own types?
> >
> > -Srin.
> > > -----Original Message-----
> > > From: xxxxx@lists.osr.com
> > > [mailto:xxxxx@lists.osr.com] On Behalf Of Henry
> > > Gabryjelski
> > > Sent: Wednesday, February 04, 2004 9:29 AM
> > > To: Windows System Software Devs Interest List
> > > Subject: RE:[ntdev] ETW?
> > >
> > >
> > > So many questions, so little time.Here’s a few
quick answers.
> > >
> > > 1) From tools\WppConfig\rev1\defaultwpp.ini:
> > >
> > > DEFINE_FLAVOR(STATUS, UINT, ItemNTSTATUS, “s”);
> > >
> > > This means you can convert to the ETW-only form
“%!STATUS!” where
> > > you previously dumped the hex code, and you’ll get a
> > > pretty-printed string. (I don’t understand the problem
with %08x?)
> > >
> > > 5) It’s not much work to write, makes driver writing
easier, and
> > > is fully in the templates ETW uses. This is just icing
if they do
> > > it.The hard part will be testing all the configurations.
> > >
> > > 6) Good feedback. I’ll let the doc writers know this
is what you
> > > really wanted to see when trying to enable debugging.
> > >
> > > .
> > >
> > >
> > > -----Original Message-----
> > > From: Rob Green [mailto:xxxxx@cdp.com]
> > > Sent: Tuesday, February 03, 2004 11:43 AM
> > > Subject: RE: ETW?
> > >
> > > See inline
> > >
> > > Thanks,
> > > Rob
> > >
> > >
> > > > 2) I believe the format string %08x would work if you
> > were passing a
> > > > non-pointer. ETW is more exacting about matching types,
> > > which I found
> > >
> > > > to be a nice side benefit. It also will complain if you
> > don’t have
> > > > enough arguments for the given format string, which
> > caught me a few
> > > > times.
> > >
> > > Yes I meant only when displaying pointers.
> > >
> > > Another problem with this regard is displaying NTSTATUS
codes… I
> > > am currently using %08x which will work for 32 bit, but not 64
> > > bit. Is there a handy % for it?
> > >
> > > I also have found bugs where there was not enough args,
which is
> > > handy (and contributed to at least one bsod when
running debug on
> > > a customer machine).
> > >
> > > >
> > > > (what is “%-*.*s” supposed to do?)
> > > >
> > >
> > > It is used to display a length specified string (such
as a Unicode
> > > string that isn’t formatted as Unicode (otherwise use
%wZ). For
> > > example IOCTL_MOUNTDEV_QUERY_SUGGESTED_LINK_NAME
> > > has a field where they specify the length of the string
and then
> > > the buffer. It should only display what is there and it is not
> > > null terminated. So instead of copying into a separate
buffer and
> > > initing a unicode string, I do this:
> > >
> > > Debug(DEBUG_DEVCON,
> > > (“SuggestedLinkName: %d, %d: ‘%-*.*ws’\n”,
> > > Link->UseOnlyIfThereAreNoOtherLinks,
> > > Link->NameLength,
> > > Link->NameLength/2,
> > > Link->NameLength/2,
> > > Link->Name));
> > >
> > > I currently have it commented out since converting to ETW. You
> > > should be able to look up format specs in the VC help.
> > >
> > > > 5) This is great feedback. I personally didn’t realize the
> > > problem of
> > > > *requiring* the WXP method of enabling tracing. I
can imagine a
> > > > method to work around this, I’ll see if I can convince the
> > > trace guys
> > > > that its worthwhile. As an added bonus, it won’t require new
> > > kernel/os changes.
> > >
> > > As I said, it didn’t really affect me as a new binary
was needed
> > > anyway. I just needed to get the WXP way working for
ia32 first,
> > > then I got the
> > > W2k working, then 64bit, and specify in the SOURCES
which one I want
> > > built for each platform. I wouldn’t spend much time on
> > this though as
> > > why support the w2k way on a brand new platform?
> > >
> > >
> > > > 6) logman.exe, which uses different syntax than tracelog,
> > > is shipped
> > > > in XP and higher. It’s also available for download, IIRC.
> > > I haven’t
> > > > dealt with auto-enabling traces in the app/driver, but I’ll
> > > pass along
> > >
> > > > that more docs are required for this.
> > > >
> > >
> > > The hardest part was figuring out how to fill in the
event trace
> > > properties structure. All the docs had info on how to
> > enable existing
> > > OS tracing (such as net, disk, kernel, etc…) and not how
> > to enable
> > > your own event provider.
> > >
> > > Looking at the docs for logman I don’t see how it is much
> > > different from tracelog. What I mean is that both of them are
> > > complicated and seem to
> > > provide the same functionality. For my purposes, I
just say “Enable
> > > debug”
> > > and then have the customer replicate the problem, then
say “Disable
> > > debug”
> > > and then have them email me the .ETL file.
> > >
> > > I also don’t see how to enable logging for the next
boot. I don’t
> > > need logging in my DriverEntry but do in my AddDevice and
> > > StartDevice routines.
> > >
> > > > 6b) I also do the same thing regarding having a
> > compile-time switch
> > > > for use DebugPrint. It’s more work in SOURCES and you
> > need to wrap
> > > > the init/unint/.TMH inclusion, but overall I’ve found it to be
> > > workable.
> > > >
> > >
> > > Yes, I had to do all of that, but I found I like this
solution the
> > > best. It is something I am comfortable with for every day
> > debugging, and not
> > > so much of pain for debugging customer issues.
> > >
> > > > I’ll pass you comments to the tracing team, see if
they’re able
> > > > to make it better.
> > >
> > >
> > > Also, all my files are .cpp which requires wrapping the
.tmh file
> > > around and extern c like so
> > >
> > > #ifdef RUN_WPP
> > > extern “C” {
> > > #include “devcon.tmh”
> > > }
> > > #endif
> > >
> > >
> > > —
> > > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as: xxxxx@nai.com To
> > unsubscribe send a blank email to xxxxx@lists.osr.com
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> > http://www.osronline.com/article.cfm?id=256
> >
> > You are currently subscribed to ntdev as:
> > xxxxx@windows.microsoft.com To unsubscribe send a blank
email to
> > xxxxx@lists.osr.com
> >
> > —
> > Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@nai.com To
> unsubscribe send a blank email to xxxxx@lists.osr.com
>
> —
> Questions? First check the Kernel Driver FAQ at
> http://www.osronline.com/article.cfm?id=256
>
> You are currently subscribed to ntdev as: xxxxx@cdp.com
> To unsubscribe send a blank email to
xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@nai.com
To unsubscribe send a blank email to xxxxx@lists.osr.com
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com