Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

More Info on Driver Writing and Debugging

The free OSR Learning Library has more than 50 articles on a wide variety of topics about writing and debugging device drivers and Minifilters. From introductory level to advanced. All the articles have been recently reviewed and updated, and are written using the clear and definitive style you've come to expect from OSR over the years.

Check out The OSR Learning Library at:

Before Posting...

Please check out the Community Guidelines in the Announcements and Administration Category.

Breakpoints going bad:

OSR_Community_UserOSR_Community_User Member Posts: 110,217
Howdy all,

been working with windbg for a while, picked up a lot on my own, and some
great hints here.

Currently I'm debugging a driver, setting my various (deferred)
breakpoints at system start.

I've managed to step through my breakpoints fairly easily (2 functions,
both are called several times from Windows), but on one call, after the
return, I'll hit f5 to "go" and I get this:

DBGHELP: FindDebugInfoFileEx-> Looking for d:\ntddk\support\xp2600
symbols\symbols\dll\mydriver.dbg... path not found
DBGHELP: FindDebugInfoFileEx-> Looking for d:\ntddk\support\xp2600
symbols\dll\mydriver.dbg... OK
DBGHELP: diaLocatePDB-> Looking for d:\ntddk\support\xp2600
symbols\dll\mydriver.pdb... OK
Unable to write breakpoint 0 at bf9b82e4, 0xD0000001
bp0 at bf9b82e4 failed
Unable to write breakpoint 1 at bf9b8dd2, 0xD0000001
bp1 at bf9b8dd2 failed
WaitForEvent failed
80506564 c20c00 ret 0xc
kd> bl
0 e bf9b82e4 0001 (0001) mydriver!DrvEnableDriver
1 e bf9b8dd2 0001 (0001) mydriver!DrvGetModes

kd> !error 0xD0000001
Error code: (NTSTATUS) 0xd0000001 (3489660929) - No mapped error code

Now I don' t know what's happened, but my breakpoints just went away, and I
can't continue on with out clearing them (windbg repeats the same message).

If I clear the breakpoints, I can continue on (but can't debug my driver
where I need to). If I clear then re-add my breakpoints, I get

kd> bu mydriver!drvenabledriver
WARNING: Software breakpoints on session addresses can cause bugchecks.
Use hardware execution breakpoints (ba e) if possible.

I've done what I'm doing now many times on other systems and OS flavors
(2k, NT) -- this is on XP that I'm working. I've tried setting just one of
the breakpoints, and windbg just pops up the same "wait for event failed".
I don't have a lot of eXPerience here (booo..) I can drop in the call stack
if it would help.

Now using hard coded breakpoints (DbgBreakPoint()/EngDebugBreak()) works
just fine, but I don't see what's happening to my breakpoints in windbg.

I'm using the 3.0.0020.0 version of the 'bag. So I'm open to any help
folks can offer. Namely -- what causes this, and how can I get around it ?


You are currently subscribed to windbg as: $subst('Recip.EmailAddr')
To unsubscribe send a blank email to leave-windbg-$subst('Recip.MemberIDChar')
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. Sign in or register to get started.

Upcoming OSR Seminars
OSR has suspended in-person seminars due to the Covid-19 outbreak. But, don't miss your training! Attend via the internet instead!
Internals & Software Drivers 15 November 2021 Live, Online
Writing WDF Drivers 24 January 2022 Live, Online
Developing Minifilters 7 February 2022 Live, Online
Kernel Debugging 21 March 2022 Live, Online