Recent Posts

Tags

News

  • A blog about Microsoft Windows development, focused on kernel-mode driver development, the Windows DDK, WDK, and related tools.

    To elaborate on the copyright notice at the bottom: all content produced by me on this site is copyright and licensed as follows:

    <!-- Creative Commons License --> Creative Commons License
    This work is licensed under a Creative Commons License. <!-- /Creative Commons License --> <!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <Work rdf:about=""> <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> <license rdf:resource="http://creativecommons.org/licenses/by-nc/2.0/" /> </Work> <License rdf:about="http://creativecommons.org/licenses/by-nc/2.0/"> <permits rdf:resource="http://web.resource.org/cc/Reproduction" /> <permits rdf:resource="http://web.resource.org/cc/Distribution" /> <requires rdf:resource="http://web.resource.org/cc/Notice" /> <requires rdf:resource="http://web.resource.org/cc/Attribution" /> <prohibits rdf:resource="http://web.resource.org/cc/CommercialUse" /> <permits rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> </License> </rdf:RDF> -->

    Although I work for Positive Networks, this work is my own and is not connected with my employer in any way.

    <!-- technorati again --> <script type="text/javascript" src="http://embed.technorati.com/embed/8xz8dihr.js"> </script>

Community

Email Notifications

Other Blogs

General

Technical Resources

About Me

Archives

Kernel Mustard

Reflections on Windows System Programming
Steve Dispensa, MVP - Windows DDK

Control Kernel Debugging From The Target

Drew Bliss from Microsoft posted a note on NTDEV today, in response to a question about debugging and CLR, and in the process pointed out a really interesting utility that ships with the new debugging packages called kdbgctrl. I decided to look into it.

It only works on 3790 and better, meaning Windows Server 2003 and Windows XP x64 Edition, and Vista of course. Here's the output from a Vista box (identical to my x64 box):

C:\Program Files\Debugging Tools for Windows 64-bit>kdbgctrl
Usage: kdbgctrl 
Options:
  -c          - Check kernel debugger block-enable
  -ca         - Check kernel debugger auto-enable
  -cb         - Check kernel debugger enable block
  -cdb        - Check kernel DbgPrint buffer size
  -cu         - Check kernel debugger user exception handling
  -cx         - Check kernel debugger enable and exit with status
  -d          - Disable kernel debugger
  -da         - Disable kernel debugger auto-enable
  -db         - Disable kernel debugger block-enable
  -du         - Disable kernel debugger user exception handling
  -e          - Enable kernel debugger
  -ea         - Enable kernel debugger auto-enable
  -eb         - Enable kernel debugger block-enable
  -eu         - Enable kernel debugger user exception handling
  -sdb  - Set kernel DbgPrint buffer size
  -td   - Get a kernel triage dump

C:\Program Files\Debugging Tools for Windows 64-bit>kdbgctrl.exe -c
Kernel debugger is enabled

C:\Program Files\Debugging Tools for Windows 64-bit>kdbgctrl.exe -ca
Kernel debugger auto-enable: false

C:\Program Files\Debugging Tools For Windows 64-bit>kdbgctrl.exe -cb
Kernel debugger enable block: false

C:\Program Files\Debugging Tools for Windows 64-bit>kdbgctrl.exe -cdb
Kernel DbgPrint buffer size: 0x1000

C:\Program Files\Debugging Tools for Windows 64-bit>kdbgctrl.exe -cu
Kernel debugger user exception enable: true

That last option, -cx, looks useful for scripting. Other than this, documentation is very light on this tool. It was mentioned a few times in the newsgroups and on the mailing lists, but not much else.

How to enable a remote kernel debugger connection on a computer that is running Windows Server 2003 with Service Pack 1 has some more information.

Comments

Steve Dispensa said:

Awesome! This looks like it will come in very handy in verifying kd sessions in our lab. :D
# November 13, 2005 4:14 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)