USB debugging trace levels for OS USB drivers

hi

I understand that you can turn on debug trace levels for checked versions of OS USB components in windbg. For example:
ed USBD_Debug_Trace_Level 0x20

(1) Is there a way to set these trace levels in the registry so that they will be set as soon as the PC starts to boot?

The reason I ask is that I am concerned about the case in which the machine crashes before you can break in the debugger.

(2) Does setting the various USB trace levels give information about any USB hardware related issues or bios issues? For example, with a PC with known USB problems, can it help get clues to the problem? Any other suggestions?

thanks in advance

The usb core is not boot start so you don’t have to worry about debugging usb when the PC starts, although a reg key would be nice (I don’t know if one exists or not). You can put a load breakpoint on the controller driver (sxe ld <name.sys>) and then do the edit (or maybe after the driver’s DriverEntry has returned)

d

________________________________________
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of S. Drasnin
Sent: Wednesday, December 07, 2005 9:18 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB debugging trace levels for OS USB drivers

hi
?
I understand that you can turn on debug trace levels for checked versions of OS USB components in windbg. For example:
ed USBD_Debug_Trace_Level 0x20
?
(1) Is there a way to set these trace levels in the registry so that they will be set as soon as the PC starts to boot??
?
The reason I ask is that I am concerned about the case in which the machine crashes before you can break in the debugger.
?
(2) Does setting the various USB trace levels give information about any USB hardware related issues or bios issues? For example, with a PC with known USB problems, can it help get clues to the problem? Any other suggestions?
?
thanks in advance
?
?
?
?


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com</name.sys>

Checked version of XP SP2 USB drivers read debug level from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USB\debuglevel DWORD value. I’m not sure how it is related to USBD_Debug_Trace_Level; in usbhub.sys it is read to USBH_Debug_Trace_Level variable. Other drivers probably use different variable name.

I used it successfully to analyze ugly USB behaviour recently. The best value with no debugger attached was 2 (it isn’t a bitmask). For 3 the output is more verbose but some drivers may decide to invoke a breakpoint when detect a problem so it is better to have debugger attached. However, even level 2 caused breakpoint sometimes when a device was unplugged and crash dump analysis showed a driver simply complained about surpsise removal.

Best regards,

Michal Vodicka
UPEK, Inc.
[xxxxx@upek.com, http://www.upek.com]


From: xxxxx@lists.osr.com[SMTP:xxxxx@lists.osr.com] on behalf of S. Drasnin[SMTP:xxxxx@msn.com]
Reply To: Windows System Software Devs Interest List
Sent: Wednesday, December 07, 2005 6:17 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB debugging trace levels for OS USB drivers

hi

I understand that you can turn on debug trace levels for checked versions of OS USB components in windbg. For example:
ed USBD_Debug_Trace_Level 0x20

(1) Is there a way to set these trace levels in the registry so that they will be set as soon as the PC starts to boot?

The reason I ask is that I am concerned about the case in which the machine crashes before you can break in the debugger.

(2) Does setting the various USB trace levels give information about any USB hardware related issues or bios issues? For example, with a PC with known USB problems, can it help get clues to the problem? Any other suggestions?

thanks in advance


Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com