viewing post-preprocessor code output

Hopefully this is a simple one. On one computer my code fails when
compile the following:

static KDEFERRED_ROUTINE XenNet_RxBufferCheck;

but on another computer it works fine. Both are running DDK
7600.16385.0.

How can I view the code after it runs through the pre-processor but
before it gets compiled? I know I can get the asm output by doing ‘build
xenpci.cod’, so I’m hoping there is a similar incantation to get the
output of the pre-processor…

Thanks

James

I think that it’s ‘xenpci.pp.’

mm

>

I think that it’s ‘xenpci.pp.’

Is that second ‘.’ intentional? I tried both “.pp” and “.pp.” (and “.p”,
and “.cpp”) without success.

Thanks

James

I use nmake foo.pp without invoking build. The inference rules do
the right thing.

Good Luck,
Dave Cattley

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of James Harper
Sent: Monday, January 11, 2010 5:08 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] viewing post-preprocessor code output

I think that it’s ‘xenpci.pp.’

Is that second ‘.’ intentional? I tried both “.pp” and “.pp.” (and “.p”,
and “.cpp”) without success.

Thanks

James


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Well, it’s intentional, but only to end the sentence.

I believe that you have to run a regular build once to generate _objects.mac; after that, I think that ‘nmake xenpci.pp’ should generate it.

mm

>

I use nmake foo.pp without invoking build. The inference
rules do
the right thing.

Perfect!

Thanks

James

James Harper wrote:

Hopefully this is a simple one. On one computer my code fails when
compile the following:

static KDEFERRED_ROUTINE XenNet_RxBufferCheck;

but on another computer it works fine. Both are running DDK
7600.16385.0.

What are you trying to do with that code? Are you just satisfying
Prefast? If this is a C++ class static member, you’ll probably need to
skip the KDEFERRED_ROUTINE typedef and just use the normal declaration.

How can I view the code after it runs through the pre-processor but
before it gets compiled?

There are no pre-processor macros in that line. KDEFERRED_ROUTINE is a
typedef.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

>

James Harper wrote:
> Hopefully this is a simple one. On one computer my code fails when
> compile the following:
>
> static KDEFERRED_ROUTINE XenNet_RxBufferCheck;
>
> but on another computer it works fine. Both are running DDK
> 7600.16385.0.
>

What are you trying to do with that code? Are you just satisfying
Prefast? If this is a C++ class static member, you’ll probably need
to
skip the KDEFERRED_ROUTINE typedef and just use the normal
declaration.

I don’t do C++ for drivers.

> How can I view the code after it runs through the pre-processor but
> before it gets compiled?

There are no pre-processor macros in that line. KDEFERRED_ROUTINE is
a
typedef.

I wanted to compare the post-pre-processor output of both files to see
if there is a difference. When I said ‘Both are running DDK
7600.16385.0’ I think I was mistaken. When I use 6001.18002 I get
exactly the same errors as the other computer is reporting, so I think
the build script is selecting the wrong DDK. I can’t think of any other
explanation.

Thanks

James

>Hopefully this is a simple one. On one computer my code fails when

compile the following:

And what is the error?


Maxim S. Shatskih
Windows DDK MVP
xxxxx@storagecraft.com
http://www.storagecraft.com