I’ve seen this problem before when doing boot debugging. I suspect that a
breakpoint has been set in the boot debugger, but that information has not
been properly handed off to the normal kernel debugger.
As we know, a software breakpoint is set by replacing a byte in the
instruction stream with a 0xCC (“int 3”). It’s the debugger’s job to handle
this breakpoint and swap the original byte back in before you hit “go”. Note
from the debugger output the O/S thinks that the first instruction in your
code is “int 3”!
kd> bp MyVolFlt!MyVolFltEvtDeviceAdd
kd> g
Break instruction exception - code 80000003 (first chance)
MyVolFlt!MyVolFltEvtDeviceAdd:
fffff800`011be0e0 cc int 3
This is serious bad business, if the debugger was working properly this
should be abstracted from you and you would see the first compiler generated
instruction. If the debugger does not put the original byte back, then the
instruction stream is hosed and you’ll get a bugcheck 50.
I have yet to try to nail this down more, but I’ve definitely seen it
frequently in VMWare environments. Options:
-
Stop enabling boot debugging if you don’t need it
-
Add a temporary __debugbreak() call in your code (don’t forget to remove
it!)
-
Do your own breakpoints by swapping the byte yourself (“db” to find out
what it is, “eb” to modify it). This sounds stupid and annoying, which it
is, but it worked for me once in a pinch.
-scott
OSR
“Speer, Kenny” wrote in message news:xxxxx@ntdev…
Since this is breaking in at DeviceAdd() of a volume filter, is this the
boot disk? Are you halting the OS during boot, so that when you start
stepping you hit page fault timeouts?
Just a common occurrence that should be checked first …
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Tuesday, January 14, 2014 7:21 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] KiPageFault into BSOD when stepping over
I’m sure it’s not KMDF’s fault since I get similar behavior without KMDF. As
I said it looks like kd side effect.
The biggest issue is that debugging experience suffers cause of restarts I’m
forced into by bug checks. There were no problems without the debugger.
NTDEV is sponsored by OSR
Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
OSR is HIRING!! See http://www.osr.com/careers
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