Possible feature request

Is possible to include a utility program (or even just some way to tell a
running WinDBG) to unload a module?
Imagine the following scenario:

  1. I run WinDBG to debug a problem in a driver.
  2. I make changes to the source code.
  3. I have to break back into the machine in WinDBG, then do .reload -u modulename
    to unload the module/symbols.
  4. I use the ddkbuild.bat file (or a modified version of it) to build the driver
    and then move the driver files into a place where the debugger can find them.

It would be nice if I could have a way, from the batch file, to tell WinDBG to
unload certain modules. This would also eliminate the need to have multiple copies
of the image/symbols on a machine, as I could unload the module from the batch
file before the build process even starts and then the build process would replace
the old image/symbols…
Yes I know it’s a minor inconvenience to have to switch back to WinDBG, but it
would still be pretty nice to have… Since WinDBG is (as I understand it) just a
gui on top of KD, is there some way/API that I could use to write a utility that
tells KD to unload a module?

Just a thought,

sean


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Jeez, you learn something every day … thanks Sean. I was killing WinDbg
or rebooting the target. Talk about brute force, but then I tend to be a
sledgehammer kind of guy. That one goes into my personal knowledge base…

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: Sean Bullington [mailto:xxxxx@stg.com]
Sent: Wednesday, August 15, 2001 11:09 AM
To: Kernel Debugging Interest List
Subject: [windbg] Possible feature request

Is possible to include a utility program (or even just some way to tell
a
running WinDBG) to unload a module?
Imagine the following scenario:

  1. I run WinDBG to debug a problem in a driver.
  2. I make changes to the source code.
  3. I have to break back into the machine in WinDBG, then do .reload -u
    modulename
    to unload the module/symbols.
  4. I use the ddkbuild.bat file (or a modified version of it) to build the
    driver
    and then move the driver files into a place where the debugger can find
    them.

It would be nice if I could have a way, from the batch file, to tell WinDBG
to
unload certain modules. This would also eliminate the need to have multiple
copies
of the image/symbols on a machine, as I could unload the module from the
batch
file before the build process even starts and then the build process would
replace
the old image/symbols…
Yes I know it’s a minor inconvenience to have to switch back to WinDBG, but
it
would still be pretty nice to have… Since WinDBG is (as I understand it)
just a
gui on top of KD, is there some way/API that I could use to write a utility
that
tells KD to unload a module?

Just a thought,

sean


You are currently subscribed to windbg as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

While I don’t know how to get the 'Bag to unload a module programmatically,
I can assert that you definitely do not need to have multiple copies of the
image and pbd. Just unload the module before you run your build script.

-----Original Message-----
From: Sean Bullington [mailto:xxxxx@stg.com]
Sent: Wednesday, August 15, 2001 11:09 AM
To: Kernel Debugging Interest List
Subject: [windbg] Possible feature request

Is possible to include a utility program (or even just some way to tell
a
running WinDBG) to unload a module?
Imagine the following scenario:

  1. I run WinDBG to debug a problem in a driver.
  2. I make changes to the source code.
  3. I have to break back into the machine in WinDBG, then do .reload -u
    modulename
    to unload the module/symbols.
  4. I use the ddkbuild.bat file (or a modified version of it) to build the
    driver
    and then move the driver files into a place where the debugger can find
    them.

It would be nice if I could have a way, from the batch file, to tell WinDBG
to
unload certain modules. This would also eliminate the need to have multiple
copies
of the image/symbols on a machine, as I could unload the module from the
batch
file before the build process even starts and then the build process would
replace
the old image/symbols…
Yes I know it’s a minor inconvenience to have to switch back to WinDBG, but
it
would still be pretty nice to have… Since WinDBG is (as I understand it)
just a
gui on top of KD, is there some way/API that I could use to write a utility
that
tells KD to unload a module?

Just a thought,

sean


You are currently subscribed to windbg as: xxxxx@intel.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Well, if you are doing a SCSI miniport, you kind of have to reboot the
target anyway, but you can limit your reboot to one by breaking into the
target, unloading the module, building the new driver, resuming the target,
copying the new driver to the target, then rebooting. Just to be complete,
you can also resume the target before building the driver.

-----Original Message-----
From: Gary Little [mailto:xxxxx@Broadstor.com]
Sent: Thursday, August 16, 2001 9:03 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Possible feature request

Jeez, you learn something every day … thanks Sean. I was killing WinDbg
or rebooting the target. Talk about brute force, but then I tend to be a
sledgehammer kind of guy. That one goes into my personal knowledge base…

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: Sean Bullington [mailto:xxxxx@stg.com]
Sent: Wednesday, August 15, 2001 11:09 AM
To: Kernel Debugging Interest List
Subject: [windbg] Possible feature request

Is possible to include a utility program (or even just some way to tell
a
running WinDBG) to unload a module?
Imagine the following scenario:

  1. I run WinDBG to debug a problem in a driver.
  2. I make changes to the source code.
  3. I have to break back into the machine in WinDBG, then do .reload -u
    modulename
    to unload the module/symbols.
  4. I use the ddkbuild.bat file (or a modified version of it) to build the
    driver
    and then move the driver files into a place where the debugger can find
    them.

It would be nice if I could have a way, from the batch file, to tell WinDBG
to
unload certain modules. This would also eliminate the need to have multiple
copies
of the image/symbols on a machine, as I could unload the module from the
batch
file before the build process even starts and then the build process would
replace
the old image/symbols…
Yes I know it’s a minor inconvenience to have to switch back to WinDBG, but
it
would still be pretty nice to have… Since WinDBG is (as I understand it)
just a
gui on top of KD, is there some way/API that I could use to write a utility
that
tells KD to unload a module?

Just a thought,

sean


You are currently subscribed to windbg as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: xxxxx@intel.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

While you can unload the module, the source files will not reload if you
don’t reboot your target machine. I’ve run into problems a few times
because I would stop my driver, unload the module, start the new driver and
reload the module. But the source files are still for the old module. If
you reboot then windbg will prompt to reload the source files.

  • Steve -

-----Original Message-----
From: Gary Little [mailto:xxxxx@broadstor.com]
Sent: Thursday, August 16, 2001 12:03 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Possible feature request

Jeez, you learn something every day … thanks Sean. I was
killing WinDbg
or rebooting the target. Talk about brute force, but then I
tend to be a
sledgehammer kind of guy. That one goes into my personal
knowledge base…

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: Sean Bullington [mailto:xxxxx@stg.com]
Sent: Wednesday, August 15, 2001 11:09 AM
To: Kernel Debugging Interest List
Subject: [windbg] Possible feature request

Is possible to include a utility program (or even just
some way to tell
a
running WinDBG) to unload a module?
Imagine the following scenario:

  1. I run WinDBG to debug a problem in a driver.
  2. I make changes to the source code.
  3. I have to break back into the machine in WinDBG, then do .reload -u
    modulename
    to unload the module/symbols.
  4. I use the ddkbuild.bat file (or a modified version of it)
    to build the
    driver
    and then move the driver files into a place where the
    debugger can find
    them.

It would be nice if I could have a way, from the batch file,
to tell WinDBG
to
unload certain modules. This would also eliminate the need to
have multiple
copies
of the image/symbols on a machine, as I could unload the
module from the
batch
file before the build process even starts and then the build
process would
replace
the old image/symbols…
Yes I know it’s a minor inconvenience to have to switch back
to WinDBG, but
it
would still be pretty nice to have… Since WinDBG is (as I
understand it)
just a
gui on top of KD, is there some way/API that I could use to
write a utility
that
tells KD to unload a module?

Just a thought,

sean


You are currently subscribed to windbg as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: xxxxx@cognex.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Why not just close those changed source files and reopen them?

Guoqing


From: Steve Whitman[SMTP:xxxxx@cognex.com]
Reply To: Kernel Debugging Interest List
Sent: Thursday, August 16, 2001 1:48 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Possible feature request

While you can unload the module, the source files will not reload if you
don’t reboot your target machine. I’ve run into problems a few times
because I would stop my driver, unload the module, start the new driver and
reload the module. But the source files are still for the old module. If
you reboot then windbg will prompt to reload the source files.

  • Steve -

> -----Original Message-----
> From: Gary Little [mailto:xxxxx@broadstor.com]
> Sent: Thursday, August 16, 2001 12:03 PM
> To: Kernel Debugging Interest List
> Subject: [windbg] RE: Possible feature request
>
>
> Jeez, you learn something every day … thanks Sean. I was
> killing WinDbg
> or rebooting the target. Talk about brute force, but then I
> tend to be a
> sledgehammer kind of guy. That one goes into my personal
> knowledge base…
>
> Gary G. Little
> Staff Engineer
> Broadband Storage, Inc.
> xxxxx@broadstor.com
>
> -----Original Message-----
> From: Sean Bullington [mailto:xxxxx@stg.com]
> Sent: Wednesday, August 15, 2001 11:09 AM
> To: Kernel Debugging Interest List
> Subject: [windbg] Possible feature request
>
> Is possible to include a utility program (or even just
> some way to tell
> a
> running WinDBG) to unload a module?
> Imagine the following scenario:
> 1. I run WinDBG to debug a problem in a driver.
> 2. I make changes to the source code.
> 3. I have to break back into the machine in WinDBG, then do .reload -u
> modulename
> to unload the module/symbols.
> 4. I use the ddkbuild.bat file (or a modified version of it)
> to build the
> driver
> and then move the driver files into a place where the
> debugger can find
> them.
>
> It would be nice if I could have a way, from the batch file,
> to tell WinDBG
> to
> unload certain modules. This would also eliminate the need to
> have multiple
> copies
> of the image/symbols on a machine, as I could unload the
> module from the
> batch
> file before the build process even starts and then the build
> process would
> replace
> the old image/symbols…
> Yes I know it’s a minor inconvenience to have to switch back
> to WinDBG, but
> it
> would still be pretty nice to have… Since WinDBG is (as I
> understand it)
> just a
> gui on top of KD, is there some way/API that I could use to
> write a utility
> that
> tells KD to unload a module?
>
> Just a thought,
>
> sean
>
>
>
> —
> You are currently subscribed to windbg as: xxxxx@broadstor.com
> To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>
> —
> You are currently subscribed to windbg as: xxxxx@cognex.com
> To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to windbg as: Guoqing.Sun@CA.COM
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

That works just fine… it just remembering to do so that is the problem.
Forget to reopen just one and you are potentially in for lots of trouble.

  • Steve -

-----Original Message-----
From: Sun, Guoqing [mailto:Guoqing.Sun@ca.com]
Sent: Thursday, August 16, 2001 5:47 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Possible feature request

Why not just close those changed source files and reopen them?

Guoqing

> ----------
> From: Steve Whitman[SMTP:xxxxx@cognex.com]
> Reply To: Kernel Debugging Interest List
> Sent: Thursday, August 16, 2001 1:48 PM
> To: Kernel Debugging Interest List
> Subject: [windbg] RE: Possible feature request
>
> While you can unload the module, the source files will not
reload if you
> don’t reboot your target machine. I’ve run into problems a
few times
> because I would stop my driver, unload the module, start
the new driver and
> reload the module. But the source files are still for the
old module. If
> you reboot then windbg will prompt to reload the source files.
>
> - Steve -
>
> > -----Original Message-----
> > From: Gary Little [mailto:xxxxx@broadstor.com]
> > Sent: Thursday, August 16, 2001 12:03 PM
> > To: Kernel Debugging Interest List
> > Subject: [windbg] RE: Possible feature request
> >
> >
> > Jeez, you learn something every day … thanks Sean. I was
> > killing WinDbg
> > or rebooting the target. Talk about brute force, but then I
> > tend to be a
> > sledgehammer kind of guy. That one goes into my personal
> > knowledge base…
> >
> > Gary G. Little
> > Staff Engineer
> > Broadband Storage, Inc.
> > xxxxx@broadstor.com
> >
> > -----Original Message-----
> > From: Sean Bullington [mailto:xxxxx@stg.com]
> > Sent: Wednesday, August 15, 2001 11:09 AM
> > To: Kernel Debugging Interest List
> > Subject: [windbg] Possible feature request
> >
> > Is possible to include a utility program (or even just
> > some way to tell
> > a
> > running WinDBG) to unload a module?
> > Imagine the following scenario:
> > 1. I run WinDBG to debug a problem in a driver.
> > 2. I make changes to the source code.
> > 3. I have to break back into the machine in WinDBG, then
do .reload -u
> > modulename
> > to unload the module/symbols.
> > 4. I use the ddkbuild.bat file (or a modified version of it)
> > to build the
> > driver
> > and then move the driver files into a place where the
> > debugger can find
> > them.
> >
> > It would be nice if I could have a way, from the batch file,
> > to tell WinDBG
> > to
> > unload certain modules. This would also eliminate the need to
> > have multiple
> > copies
> > of the image/symbols on a machine, as I could unload the
> > module from the
> > batch
> > file before the build process even starts and then the build
> > process would
> > replace
> > the old image/symbols…
> > Yes I know it’s a minor inconvenience to have to switch back
> > to WinDBG, but
> > it
> > would still be pretty nice to have… Since WinDBG is (as I
> > understand it)
> > just a
> > gui on top of KD, is there some way/API that I could use to
> > write a utility
> > that
> > tells KD to unload a module?
> >
> > Just a thought,
> >
> > sean
> >
> >
> >
> > —
> > You are currently subscribed to windbg as: xxxxx@broadstor.com
> > To unsubscribe send a blank email to
leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> > —
> > You are currently subscribed to windbg as: xxxxx@cognex.com
> > To unsubscribe send a blank email to
leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
> —
> You are currently subscribed to windbg as: Guoqing.Sun@CA.COM
> To unsubscribe send a blank email to
leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to windbg as: xxxxx@cognex.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I don’t explicitly open them at all. I just step into and out of functions
that I want to see. If the source isn’t open, it will open automatically.
I do keep the source with the entry point open, but it gets automatically
updated because I have to reboot, as I am doing a disk driver.

You can close all of your sources, then type:
bp MyDriver!MyRoutine.

It will open the source when it hits the bp. Use bu, if your driver isn’t
loaded yet.

Phil

-----Original Message-----
From: Steve Whitman [mailto:xxxxx@cognex.com]
Sent: Friday, August 17, 2001 7:17 AM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Possible feature request

That works just fine… it just remembering to do so that is the problem.
Forget to reopen just one and you are potentially in for lots of trouble.

  • Steve -

-----Original Message-----
From: Sun, Guoqing [mailto:Guoqing.Sun@ca.com]
Sent: Thursday, August 16, 2001 5:47 PM
To: Kernel Debugging Interest List
Subject: [windbg] RE: Possible feature request

Why not just close those changed source files and reopen them?

Guoqing

> ----------
> From: Steve Whitman[SMTP:xxxxx@cognex.com]
> Reply To: Kernel Debugging Interest List
> Sent: Thursday, August 16, 2001 1:48 PM
> To: Kernel Debugging Interest List
> Subject: [windbg] RE: Possible feature request
>
> While you can unload the module, the source files will not
reload if you
> don’t reboot your target machine. I’ve run into problems a
few times
> because I would stop my driver, unload the module, start
the new driver and
> reload the module. But the source files are still for the
old module. If
> you reboot then windbg will prompt to reload the source files.
>
> - Steve -
>
> > -----Original Message-----
> > From: Gary Little [mailto:xxxxx@broadstor.com]
> > Sent: Thursday, August 16, 2001 12:03 PM
> > To: Kernel Debugging Interest List
> > Subject: [windbg] RE: Possible feature request
> >
> >
> > Jeez, you learn something every day … thanks Sean. I was
> > killing WinDbg
> > or rebooting the target. Talk about brute force, but then I
> > tend to be a
> > sledgehammer kind of guy. That one goes into my personal
> > knowledge base…
> >
> > Gary G. Little
> > Staff Engineer
> > Broadband Storage, Inc.
> > xxxxx@broadstor.com
> >
> > -----Original Message-----
> > From: Sean Bullington [mailto:xxxxx@stg.com]
> > Sent: Wednesday, August 15, 2001 11:09 AM
> > To: Kernel Debugging Interest List
> > Subject: [windbg] Possible feature request
> >
> > Is possible to include a utility program (or even just
> > some way to tell
> > a
> > running WinDBG) to unload a module?
> > Imagine the following scenario:
> > 1. I run WinDBG to debug a problem in a driver.
> > 2. I make changes to the source code.
> > 3. I have to break back into the machine in WinDBG, then
do .reload -u
> > modulename
> > to unload the module/symbols.
> > 4. I use the ddkbuild.bat file (or a modified version of it)
> > to build the
> > driver
> > and then move the driver files into a place where the
> > debugger can find
> > them.
> >
> > It would be nice if I could have a way, from the batch file,
> > to tell WinDBG
> > to
> > unload certain modules. This would also eliminate the need to
> > have multiple
> > copies
> > of the image/symbols on a machine, as I could unload the
> > module from the
> > batch
> > file before the build process even starts and then the build
> > process would
> > replace
> > the old image/symbols…
> > Yes I know it’s a minor inconvenience to have to switch back
> > to WinDBG, but
> > it
> > would still be pretty nice to have… Since WinDBG is (as I
> > understand it)
> > just a
> > gui on top of KD, is there some way/API that I could use to
> > write a utility
> > that
> > tells KD to unload a module?
> >
> > Just a thought,
> >
> > sean
> >
> >
> >
> > —
> > You are currently subscribed to windbg as: xxxxx@broadstor.com
> > To unsubscribe send a blank email to
leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
> > —
> > You are currently subscribed to windbg as: xxxxx@cognex.com
> > To unsubscribe send a blank email to
leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> >
>
> —
> You are currently subscribed to windbg as: Guoqing.Sun@CA.COM
> To unsubscribe send a blank email to
leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com
>


You are currently subscribed to windbg as: xxxxx@cognex.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: xxxxx@intel.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Something like this is totally possible. Check out the SDK stuff you
can install with the debugger. With those interfaces you could write a
little app that could connect to a remoted debugger session and execute
“.reload -u”

Then just call that app with whatever parameters as part of your build
or prop scripts.

-----Original Message-----
From: Sean Bullington [mailto:xxxxx@stg.com]
Sent: Wednesday, August 15, 2001 11:09 AM
To: Kernel Debugging Interest List
Subject: [windbg] Possible feature request

Is possible to include a utility program (or even just some way to
tell a
running WinDBG) to unload a module?
Imagine the following scenario:

  1. I run WinDBG to debug a problem in a driver.
  2. I make changes to the source code.
  3. I have to break back into the machine in WinDBG, then do .reload -u
    modulename
    to unload the module/symbols.
  4. I use the ddkbuild.bat file (or a modified version of it) to build
    the driver
    and then move the driver files into a place where the debugger can find
    them.

It would be nice if I could have a way, from the batch file, to tell
WinDBG to
unload certain modules. This would also eliminate the need to have
multiple copies
of the image/symbols on a machine, as I could unload the module from the
batch
file before the build process even starts and then the build process
would replace
the old image/symbols…
Yes I know it’s a minor inconvenience to have to switch back to WinDBG,
but it
would still be pretty nice to have… Since WinDBG is (as I understand
it) just a
gui on top of KD, is there some way/API that I could use to write a
utility that
tells KD to unload a module?

Just a thought,

sean


You are currently subscribed to windbg as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com