Hi -

I am developing a USB Video Class device from scratch, and am trying
to get started understanding why usbvideo.sys fails to talk to my
device.

I am not a Windows device driver developer, but I've spent a fair
amount of time searching and looked through several books, but have
not found the answer to my question:

What is the minimum setup required in order to receive debug messages
(KdPrint / printf's) from the checked build of usbvideo.sys?

I have installed the WinXP SP3a checked build operating system into a
vmware machine, along with the WDK and the "Debugging Tools". I am
able to use WinDbg to connect to the local kernel, and find the
symbols etc. I am able to browse the symbols of anything I like, and
modify anything I like.

However I feel like I am missing something "basic" because I have yet
to see any debug messages come into the WinDbg window.

So I was wondering if there was an "idiots guide" somewhere, that
showed step by step poking of appropriate symbols to get debug output
from any driver, just so I can see something happen.

Thank you for any pointers you can provide.

John

Re: idiots guide to driver debug messages by Don

Don
Tue Sep 02 08:54:22 CDT 2008

Well a couple of things to try (note I do not work in this area USB video so
these are guesses based on experience in the kernel). First take a look at:

http://support.microsoft.com/kb/314743/en-us

This explains how to enable debug print messages for a number of subsystems.
Now, it turns out there are more subsystems than documented in the article.
In paticular if you look in dpfiltr.h in the latest WDK you will see all the
filter masks you can use. So from that list you might want to try:

ed NT!Kd_VIDEOPRT_Mask 0xFFFFFFFF
ed NT!Kd_VIDEO_Mask 0xFFFFFFFF

No idea what this will enable, but give it a shot.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply




<jrogersdsp@yahoo.com> wrote in message
news:f8d6eec2-f0d2-407c-97c9-869933115b08@y38g2000hsy.googlegroups.com...
> Hi -
>
> I am developing a USB Video Class device from scratch, and am trying
> to get started understanding why usbvideo.sys fails to talk to my
> device.
>
> I am not a Windows device driver developer, but I've spent a fair
> amount of time searching and looked through several books, but have
> not found the answer to my question:
>
> What is the minimum setup required in order to receive debug messages
> (KdPrint / printf's) from the checked build of usbvideo.sys?
>
> I have installed the WinXP SP3a checked build operating system into a
> vmware machine, along with the WDK and the "Debugging Tools". I am
> able to use WinDbg to connect to the local kernel, and find the
> symbols etc. I am able to browse the symbols of anything I like, and
> modify anything I like.
>
> However I feel like I am missing something "basic" because I have yet
> to see any debug messages come into the WinDbg window.
>
> So I was wondering if there was an "idiots guide" somewhere, that
> showed step by step poking of appropriate symbols to get debug output
> from any driver, just so I can see something happen.
>
> Thank you for any pointers you can provide.
>
> John



Re: idiots guide to driver debug messages by jrogersdsp

jrogersdsp
Tue Sep 02 09:19:41 CDT 2008

On Sep 2, 9:54 am, "Don Burn" <b...@stopspam.windrvr.com> wrote:
> http://support.microsoft.com/kb/314743/en-us
[...]
> filter masks you can use. So from that list you might want to try:
>
> ed NT!Kd_VIDEOPRT_Mask 0xFFFFFFFF
> ed NT!Kd_VIDEO_Mask 0xFFFFFFFF
>
> No idea what this will enable, but give it a shot.


Thanks, I just tried those and had been trying the symbols in the USB
section of that document in previous attempts. But I still dont see
anything.

I feel like I'm missing something basic: like there is a toplevel
switch to globally enable output, or I have not opened the correct
window in the correct tool in order to receive the output.

When debug output is passing all the masks and is being sent to the
debugger (WinDbg or other) - what window/where does it appear? and/
or is there a way to send it all automatically to a file?

Thanks again.


John

Re: idiots guide to driver debug messages by Don

Don
Tue Sep 02 09:28:33 CDT 2008

The output should appear in the command window when the system is running.
I am assuming you have things setup with WinDBG on one virtual machine and
the target on a second virtual machine with a virtual serial port connecting
the two. I am not a VMware user but this site seems to have a good
description of what you need to do:
http://silverstr.ufies.org/lotr0/windbg-vmware.html

--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply




<jrogersdsp@yahoo.com> wrote in message
news:e1d5fa86-6ff4-426f-9ff7-34ee2cda5b9c@l42g2000hsc.googlegroups.com...
> On Sep 2, 9:54 am, "Don Burn" <b...@stopspam.windrvr.com> wrote:
>> http://support.microsoft.com/kb/314743/en-us
> [...]
>> filter masks you can use. So from that list you might want to try:
>>
>> ed NT!Kd_VIDEOPRT_Mask 0xFFFFFFFF
>> ed NT!Kd_VIDEO_Mask 0xFFFFFFFF
>>
>> No idea what this will enable, but give it a shot.
>
>
> Thanks, I just tried those and had been trying the symbols in the USB
> section of that document in previous attempts. But I still dont see
> anything.
>
> I feel like I'm missing something basic: like there is a toplevel
> switch to globally enable output, or I have not opened the correct
> window in the correct tool in order to receive the output.
>
> When debug output is passing all the masks and is being sent to the
> debugger (WinDbg or other) - what window/where does it appear? and/
> or is there a way to send it all automatically to a file?
>
> Thanks again.
>
>
> John



Re: idiots guide to driver debug messages by jrogersdsp

jrogersdsp
Tue Sep 02 09:38:36 CDT 2008

On Sep 2, 10:28 am, "Don Burn" <b...@stopspam.windrvr.com> wrote:
> The output should appear in the command window when the system is running.
> I am assuming you have things setup with WinDBG on one virtual machine and
> the target on a second virtual machine with a virtual serial port connecting
> the two. I am not a VMware user but this site seems to have a good
> description of what you need to do:http://silverstr.ufies.org/lotr0/windbg-vmware.html

Actually, that was not what I was doing, but I'll give that a try
since it looks far more desirable.

I was just using "local kernel" debugging with WinDbg, and yes looking
for output in the "Command Window" of that tool.

Thanks.

Re: idiots guide to driver debug messages by Don

Don
Tue Sep 02 10:02:09 CDT 2008

Local kernel debugging only allows examination of variables, you cannot run
the kernel, get message output, or set breakpoints with that mode.

--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply





<jrogersdsp@yahoo.com> wrote in message
news:266f030b-521e-491e-a8df-857613a73a02@t54g2000hsg.googlegroups.com...
> On Sep 2, 10:28 am, "Don Burn" <b...@stopspam.windrvr.com> wrote:
>> The output should appear in the command window when the system is
>> running.
>> I am assuming you have things setup with WinDBG on one virtual machine
>> and
>> the target on a second virtual machine with a virtual serial port
>> connecting
>> the two. I am not a VMware user but this site seems to have a good
>> description of what you need to
>> do:http://silverstr.ufies.org/lotr0/windbg-vmware.html
>
> Actually, that was not what I was doing, but I'll give that a try
> since it looks far more desirable.
>
> I was just using "local kernel" debugging with WinDbg, and yes looking
> for output in the "Command Window" of that tool.
>
> Thanks.



Re: idiots guide to driver debug messages by jrogersdsp

jrogersdsp
Tue Sep 02 11:33:59 CDT 2008

On Sep 2, 11:02 am, "Don Burn" <b...@stopspam.windrvr.com> wrote:
> Local kernel debugging only allows examination of variables, you cannot run
> the kernel, get message output, or set breakpoints with that mode.

Thanks, this is the idiot part I was missing.

Works great, without doing anything special in the vmware serial port
setup you linked previously.

Thanks again.

John.