Unloading Driver in WinDbg

Hello,

My Win2K Bus Driver seems to hang the target system when it boots up. Is
there any way I can unload my driver using WinDbg, so as to enable the
target system to boot properly ?

Thanks!
Puja

If it is WDM, you can do the following:

  1. enable initial breakpoint in WnDbg;
  2. when it breaks in, set a breakpoint at your DriverEntry routine;
    bp MyDriver.SYS!DriverEntry
  3. when it breaks there step thru (pro’lly you do nothing there but fill in
    structs) and upon exit from it set
    EAX=0xC0000099

That’l tell the system not to leave the driver alone for this session.

Later, you can go to Device Manager and remove the device (or delete the
driver)


Alternatively, try booting in safe mode (F8 at start) and delete your SYS
file from disk.
(This is what I’d do first!!!)


Ilko Dossev
SR Sw Eng
Intelligraphics, Inc.

----- Original Message -----
From:
To: “Kernel Debugging Interest List”
Sent: Friday, May 12, 2000 6:55 PM
Subject: [windbg] Unloading Driver in WinDbg

> Hello,
>
> My Win2K Bus Driver seems to hang the target system when it boots up. Is
> there any way I can unload my driver using WinDbg, so as to enable the
> target system to boot properly ?
>
> Thanks!
> Puja
>
> —
> You are currently subscribed to windbg as: xxxxx@intelligraphics.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>

Hello,

My driver is a Win2K driver but not WDM (I donot include “wdm.h” file
anywhere).
So does it mean the technique you describe below will not work for me ?

Thanks
Puja

On 05/12/00, ““Ilko Dossev” ” wrote:
> If it is WDM, you can do the following:
>
> 1. enable initial breakpoint in WnDbg;
> 2. when it breaks in, set a breakpoint at your DriverEntry routine;
> bp MyDriver.SYS!DriverEntry
> 3. when it breaks there step thru (pro’lly you do nothing there but fill in
> structs) and upon exit from it set
> EAX=0xC0000099
>
> That’l tell the system not to leave the driver alone for this session.
>
> Later, you can go to Device Manager and remove the device (or delete the
> driver)
>
> -----
>
> Alternatively, try booting in safe mode (F8 at start) and delete your SYS
> file from disk.
> (This is what I’d do first!!!)
>
> -----
>
> Ilko Dossev
> SR Sw Eng
> Intelligraphics, Inc.
>
>
> ----- Original Message -----
> From:
> To: “Kernel Debugging Interest List”
> Sent: Friday, May 12, 2000 6:55 PM
> Subject: [windbg] Unloading Driver in WinDbg
>
>
> > Hello,
> >
> > My Win2K Bus Driver seems to hang the target system when it boots up. Is
> > there any way I can unload my driver using WinDbg, so as to enable the
> > target system to boot properly ?
> >
> > Thanks!
> > Puja
> >
> > —
> > You are currently subscribed to windbg as: xxxxx@intelligraphics.com
> > To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> >

Thank you much, I pressed F8 and chose the option to Boot with Last Good HW
Profile and the system booted fine. Is this what you are referring to as
“safe mode” or is it different ?

Thanks a lot!
Puja

Alternatively, try booting in safe mode (F8 at start) and delete your SYS
file from disk.
(This is what I’d do first!!!)


Ilko Dossev
SR Sw Eng
Intelligraphics, Inc.

----- Original Message -----
From:
> To: “Kernel Debugging Interest List”
> Sent: Friday, May 12, 2000 6:55 PM
> Subject: [windbg] Unloading Driver in WinDbg
>
>
> > Hello,
> >
> > My Win2K Bus Driver seems to hang the target system when it boots up. Is
> > there any way I can unload my driver using WinDbg, so as to enable the
> > target system to boot properly ?
> >
> > Thanks!
> > Puja
> >
> > —
> > You are currently subscribed to windbg as: xxxxx@intelligraphics.com
> > To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> >

I am not absolutely certain, but pro’lly not.

DriverEntry is *mandatory* export for WDM drivers.
If it returns FALSE, no more processing, no more calls, no GPFs.
(I use to do that myself, that’s why I keep DriverEntry as simple as
possible)

Ilko

----- Original Message -----
From:
To: “Kernel Debugging Interest List”
Sent: Monday, May 15, 2000 1:00 PM
Subject: [windbg] Re: Unloading Driver in WinDbg

> Hello,
>
> My driver is a Win2K driver but not WDM (I donot include “wdm.h” file
> anywhere).
> So does it mean the technique you describe below will not work for me ?
>
> Thanks
> Puja
>
> On 05/12/00, ““Ilko Dossev” ” wrote:
> > If it is WDM, you can do the following:
> >
> > 1. enable initial breakpoint in WnDbg;
> > 2. when it breaks in, set a breakpoint at your DriverEntry routine;
> > bp MyDriver.SYS!DriverEntry
> > 3. when it breaks there step thru (pro’lly you do nothing there but fill
in
> > structs) and upon exit from it set
> > EAX=0xC0000099
> >
> > That’l tell the system not to leave the driver alone for this session.
> >
> > Later, you can go to Device Manager and remove the device (or delete the
> > driver)
> >
> > -----
> >
> > Alternatively, try booting in safe mode (F8 at start) and delete your
SYS
> > file from disk.
> > (This is what I’d do first!!!)
> >
> > -----
> >
> > Ilko Dossev
> > SR Sw Eng
> > Intelligraphics, Inc.
> >
> >
> > ----- Original Message -----
> > From:
> > To: “Kernel Debugging Interest List”
> > Sent: Friday, May 12, 2000 6:55 PM
> > Subject: [windbg] Unloading Driver in WinDbg
> >
> >
> > > Hello,
> > >
> > > My Win2K Bus Driver seems to hang the target system when it boots up.
Is
> > > there any way I can unload my driver using WinDbg, so as to enable the
> > > target system to boot properly ?
> > >
> > > Thanks!
> > > Puja
> > >
> > > —
> > > You are currently subscribed to windbg as: xxxxx@intelligraphics.com
> > > To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> > >
>
> —
> You are currently subscribed to windbg as: xxxxx@intelligraphics.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>

Absolutely. F8 tels system to avoid loading extra drivvers, only disk access
and peripherals and VGA.
Glad to read that you succeeded!

Ilko :slight_smile:

----- Original Message -----
From:
To: “Kernel Debugging Interest List”
Sent: Monday, May 15, 2000 1:33 PM
Subject: [windbg] Re: Unloading Driver in WinDbg

>
> Thank you much, I pressed F8 and chose the option to Boot with Last Good
HW
> Profile and the system booted fine. Is this what you are referring to as
> “safe mode” or is it different ?
>
> Thanks a lot!
> Puja
>
>
> > Alternatively, try booting in safe mode (F8 at start) and delete your
SYS
> > file from disk.
> > (This is what I’d do first!!!)
> >
> > -----
> >
> > Ilko Dossev
> > SR Sw Eng
> > Intelligraphics, Inc.
> >
> >
> > ----- Original Message -----
> > From:
> > To: “Kernel Debugging Interest List”
> > Sent: Friday, May 12, 2000 6:55 PM
> > Subject: [windbg] Unloading Driver in WinDbg
> >
> >
> > > Hello,
> > >
> > > My Win2K Bus Driver seems to hang the target system when it boots up.
Is
> > > there any way I can unload my driver using WinDbg, so as to enable the
> > > target system to boot properly ?
> > >
> > > Thanks!
> > > Puja
> > >
> > > —
> > > You are currently subscribed to windbg as: xxxxx@intelligraphics.com
> > > To unsubscribe send a blank email to $subst(‘Email.Unsub’)
> > >
>
> —
> You are currently subscribed to windbg as: xxxxx@intelligraphics.com
> To unsubscribe send a blank email to $subst(‘Email.Unsub’)
>