WinDbg Breakpoint NOT Being Hit But Code is Executed

I am using WinDbg version 6.3.9600.17298 for AMD64 on a Windows 7 x64 system to inspect a Unidrv Print Driver’s code.

The source path and breakpoints have been setup correctly. I am able to break and walk through the source code; however, there are some breakpoints that do NOT happen (and I have therefore been unable to step through the code) even though I am sure the code is executed. These breakpoints are all set in the optional rendering plugin methods and/or the DDI Hook-out functions. I know that the break points for these functions are set because the bl WindDbg command lists them as such with addresses, et cetera. I should also note that the built-in debug messages (via VERBOSE macro) are also NOT being sent to the Windbg console for these sections of code, but other sections, even code sections in the same file, are.

I know that the associated code is executed because the resulting printout is correct and the resulting *.prn file (when using print to file) is correct and it would NOT be otherwise.

Any thoughts on what might be happening and how to work around it?

Is it possible you are tracing through an optimised build? You may need to step through at instruction level
(‘Disassembly’ debug) to see exactly what’s happening.

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:bounce-612448-
xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: 13 July 2016 22:08
To: Kernel Debugging Interest List
Subject: [windbg] WinDbg Breakpoint NOT Being Hit But Code is Executed

I am using WinDbg version 6.3.9600.17298 for AMD64 on a Windows 7 x64
system to inspect a Unidrv Print Driver’s code.

The source path and breakpoints have been setup correctly. I am able
to break and walk through the source code; however, there are some
breakpoints that do NOT happen (and I have therefore been unable to
step through the code) even though I am sure the code is executed.
These breakpoints are all set in the optional rendering plugin methods
and/or the DDI Hook-out functions. I know that the break points for
these functions are set because the bl WindDbg command lists them as
such with addresses, et cetera. I should also note that the built-in
debug messages (via VERBOSE macro) are also NOT being sent to the
Windbg console for these sections of code, but other sections, even
code sections in the same file, are.

I know that the associated code is executed because the resulting
printout is correct and the resulting *.prn file (when using print to
file) is correct and it would NOT be otherwise.

Any thoughts on what might be happening and how to work around it?

David,

Thanks for the response. I have compiler optimizations off (/0d), but stepping through the assembly may be the best way to figure out what is happening. I will give it a shot and see what I can come up with…

Thanks,
Ian