How to disable optimization when building WRK for easily debug...
1. Build AMD64 WRK
a) Edit /BASE/NTOS/BUILD/MAKEFILE.BUILD
targcopts = -Wp64 -Zi -Od -EHs-c- /Od -Gs12288 -GL- -MT -U_MT
b) Edit /BASE/NTOS/PERF/HOOKS.C, implement function abs(…) at line 405 by yourself. For example
c) Build with command ‘nmake –nologo amd64=’
2. Build X86 WRK
1) First build X86 WRK with optimization on
2) Copy /BASE/NTOS/RTL/BUILD/OBJI386/bitmap.obj out for later use
3) Clean with command ‘nmake x86= clean’
4) Edit /BASE/NTOS/BUILD/MAKEFILE.BUILD
targcopts = -Gm- -Gz -GX- -G6 -Ze -Gi- -QIfdiv- -Zi -Od -Oy-
5) Copy bitmap.obj to /BASE/NTOS/RTL/BUILD/OBJI386/bitmap.obj
6) Build with command ‘nmake –nologo x86=’
I debugged AMD64 WRK with optimization off in 64bit win03sp2, it worked fine. Good luck!