One of my “pet peeves” (which isn’t really a WinDBG issue per-se, but
rather an OS handling of embedded application breakpoints that impacts
on the usability of WinDBG) has been that if you boot the kernel with
“/debug” (which is necessary for proper local debugging - such as I do
when demonstrating data structures in class) then ANY application with
an embedded breakpoint will drop into the debugger.
For example, I’m currently running the “windows update” process in a
machine I have that I use for debugging; since I’m not doing development
I didn’t start up the debugger. It appears, however, that the Windows
Media 10 folks decided to leave embedded breakpoints in their code (I
connected the debugger and it immediately attached. The stack backtrace
is all in user mode. I had to type “g” five times in order to get it to
continue.)
Why is this a WinDBG issue? Only because it limits the effectiveness of
local kernel debugging if, by specifying “/debug” to lock down the
debugger structures, you also then open yourself to random applications
that have embedded a breakpoint. Perhaps a “/kmdebug” switch would be a
nice option, so that USER level breakpoints are ignored and kernel level
breakpoints are not. That would make local kernel debugging safe again.
Ah, and now there’s another one. Make it six breakpoints… (ok, this
one is in WM-DRM enabled media player, not Media Player 10.) Another
five - ten total. So its probably in some DLL they both call.
Alternatively, we could round up a firing squad to shoot people who ship
production code with embedded breakpoints. Could be fun - there’s a
shooting range just down the street (on Bel-Red road.)
Regards,
Tony
Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.