UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha


Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day

Did you use “!sym noisy” to observe where WinDBG is looking and if
there’s something wrong with the PDB file?

Regards,

Tony

Tony Mason

Consulting Partner

OSR Open Systems Resources, Inc.

http://www.osr.com


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Friday, April 21, 2006 12:07 AM
To: ntdev redirect
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build
environment.
I did not get what symbols it is asking for?

Thanks
-Harsha


Celebrate Earth Day everyday! Discover 10 things you can do to help slow
climate change. Yahoo! Earth Day
http:> — Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</http:>

are the symbols in your symbol path?

-p


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build
environment.
I did not get what symbols it is asking for?

Thanks
-Harsha


Celebrate Earth Day everyday! Discover 10 things you can do to help slow
climate change. Yahoo! Earth Day
http:m> — Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer</http:>

HI peterwie,

Yes, I have mentioned the proper symbol path in the WIndbg.
Do we need to take any additional things while debugging UMDF driver.
I am doing the UMDF driver debugging for the first time.
Si I am little confused here.

Bye
-Harsha

Peter Wieland wrote:
are the symbols in your symbol path?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote: are the symbols in your symbol path?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min.

Hi Peter/Tony,

From where can I download WudfExt.dll(UMDF Debugger extension for Windbg)?
I searched at following site and could not found anything related to UMDF debugger extension

http://www.microsoft.com/whdc/devtools/debugging/default.mspx

Thanks
-Harsha

Peter Wieland wrote: are the symbols in your symbol path?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

"Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation"

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote:

are the symbols in your symbol path?

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha


Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

________________________________

Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:</http:></http:>

Hi Peter Wieland,

Thankyou very much
Its working now…
Now I am able to put break point in UMDF driver and able debugg it.
I exactly followed the steps given in WINDDK .
One more thing I did was, we have to rum windbg in elevated level(Run as administrator in windows vista) .I also cleared the file repository of the sample Umdf driver & did a fresh installation, because of this erlier there was mismatch in UMDF driver and symbol file.

Thanks
-Harsha

Peter Wieland wrote:
You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote: are the symbols in your symbol path?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day

Hi Peter Wieland,

I could able to set break point in the UMDF driver, But I can put it only after completly loading the UMDF driver. I want to give Initial break point so that while installing only I want see control hitting the breakpoint.
To enable Initial break point we have to set flag HostProcessDbgBreakOnStart in the UMDF_Host key to TRUE.I searched for flag HostProcessDbgBreakOnStart in the registry and I could not find it.

Could pls help me out in the setting the Initial break point in UMDF driver.

Thanks and regards
-Harsha

Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

Harsha HS wrote:
Hi Peter Wieland,

Thankyou very much
Its working now…
Now I am able to put break point in UMDF driver and able debugg it.
I exactly followed the steps given in WINDDK .
One more thing I did was, we have to rum windbg in elevated level(Run as administrator in windows vista) .I also cleared the file repository of the sample Umdf driver & did a fresh installation, because of this erlier there was mismatch in UMDF driver and symbol file.

Thanks
-Harsha

Peter Wieland wrote:
You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote: are the symbols in your symbol path?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice.

__asm{ int 3 } or __debugbreak

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Harsha HS”
To: “Windows System Software Devs Interest List”
Sent: Wednesday, May 10, 2006 3:26 PM
Subject: RE: [ntdev] UMDF driver debugging

> Hi Peter Wieland,
>
> I could able to set break point in the UMDF driver, But I can put it only
after completly loading the UMDF driver. I want to give Initial break point so
that while installing only I want see control hitting the breakpoint.
> To enable Initial break point we have to set flag
HostProcessDbgBreakOnStart in the UMDF_Host key to TRUE.I searched for flag
HostProcessDbgBreakOnStart in the registry and I could not find it.
>
> Could pls help me out in the setting the Initial break point in UMDF
driver.
>
> Thanks and regards
> -Harsha
>
>
>
>
> Have you set the registry flag that stalls host startup until a debugger is
attached (HostProcessDbgBreakOnStart)?
>
> Harsha HS wrote:
> Hi Peter Wieland,
>
> Thankyou very much
> Its working now…
> Now I am able to put break point in UMDF driver and able debugg it.
> I exactly followed the steps given in WINDDK .
> One more thing I did was, we have to rum windbg in elevated level(Run as
administrator in windows vista) .I also cleared the file repository of the
sample Umdf driver & did a fresh installation, because of this erlier there was
mismatch in UMDF driver and symbol file.
>
> Thanks
> -Harsha
>
>
> Peter Wieland wrote:
> You’re trying to set a breakpoint by opening your source file thruogh
the file menu aren’t you. I suspect your driver isn’t yet loaded, and so
WinDBG has absoutely no idea what module the source file you opened is part of.
Even if your driver is loaded, WINDBG cannot match an arbitrary source file
you’ve opened to a particular module.
>
> Set the breakpoint from the command line instead. “bu
MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint”
which the debugger will attempt to resolve each time it loads a module.
>
> I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have
you set the registry flag that stalls host startup until a debugger is attached
(HostProcessDbgBreakOnStart)?
>
> -p
>
>
>
> ---------------------------------
> From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
> Sent: Sunday, April 23, 2006 11:19 PM
> To: Windows System Software Devs Interest List
> Subject: RE: [ntdev] UMDF driver debugging
>
>
>
> Hi Peter,
>
> The moment I try to put break point on any of the line in UMDF driver, a
message pops up saying
>
> “Symbol Information for the current line could not be located
in the currently loaded symbols.
> Do you want the debugger to load and search the remaining Symbols?
>
> Yes performs the search immediately
> No returns to the UI while the search proceeds
> Cancel exists the operation”
>
>
> And if U select yes, it pops up
>
> “Code not found”
>
> Thanks
> -Harsha
>
>
>
> Peter Wieland wrote: are the symbols
in your symbol path?
>
> -p
>
>
> ---------------------------------
> From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
> Sent: Thursday, April 20, 2006 9:07 PM
> To: Windows System Software Devs Interest List
> Subject: [ntdev] UMDF driver debugging
>
>
>
> Hi,
>
>
> Has anybody had done UMDF(Windows vista)driver debugging?
> We are using Windbg to debug umdf driver. It is asking for
> symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
> available in the same PC as I built the UMDF driver in checked build
environment.
> I did not get what symbols it is asking for?
>
>
> Thanks
> -Harsha
>
> ---------------------------------
> Celebrate Earth Day everyday! Discover 10 things you can do to help slow
climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver
FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>
>
> ---------------------------------
> Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates
starting at 1¢/min. — Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>
>
> ---------------------------------
> Celebrate Earth Day everyday! Discover 10 things you can do to help slow
climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver
FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
>
>
> ---------------------------------
> Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo!
Messenger with Voice.
> —
> Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Sorry Harsha, but i’m not entirely sure what you’re looking for.

If you’re trying to setup a breakpoint so that you can catch the driver loading during the device installation, you can still use the HostProcessDbgBreakOnStart value since the host-GUID exists before your device is installed.

If you want to set a breakpoint in your driver before the driver has loaded & you’re using a user-mode debugger like cdb or ntsd, you can set a deferrred breakpoint using the BU command (bu mydriver!DllMain) which the debugger will try to resolve whenever it sees MyDriver load. I don’t believe these work in the kernel-mode debugger unfortunately.

An altermative is to add a call to DbgBreakPoint() to your driver (you may have to define the prototype for this yourself). This will cause the driver to first drop into the debugger (checks user-mode debugger first, then kernel debugger) but the driver will exit if neither is attached.

There’s another registry entry that i’ll have to lookup when i get in which allows you to break after your driver has been loaded. You’ll miss the call to DllMain this way but all your symbols will be in place.

Let me know if any of these options is what you were asking for, or if your question was something else.

-p


From: xxxxx@lists.osr.com on behalf of Harsha HS
Sent: Wed 5/10/2006 4:26 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter Wieland,

I could able to set break point in the UMDF driver, But I can put it only after completly loading the UMDF driver. I want to give Initial break point so that while installing only I want see control hitting the breakpoint.
To enable Initial break point we have to set flag HostProcessDbgBreakOnStart in the UMDF_Host key to TRUE.I searched for flag HostProcessDbgBreakOnStart in the registry and I could not find it.

Could pls help me out in the setting the Initial break point in UMDF driver.

Thanks and regards
-Harsha

Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

Harsha HS wrote:

Hi Peter Wieland,

Thankyou very much
Its working now…
Now I am able to put break point in UMDF driver and able debugg it.
I exactly followed the steps given in WINDDK .
One more thing I did was, we have to rum windbg in elevated level(Run as administrator in windows vista) .I also cleared the file repository of the sample Umdf driver & did a fresh installation, because of this erlier there was mismatch in UMDF driver and symbol file.

Thanks
-Harsha

Peter Wieland wrote:

You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote:

are the symbols in your symbol path?

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha


Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Blab-away for as little as 1?/min. Make PC-to-Phone Calls http: using Yahoo! Messenger with Voice. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:></http:></http:></http:>

I think the OP is having a hard time finding the right place in the registry to set HostProcessDbgBreakOnStart

Perhaps you could give the full key path? I have not done any UMDF work yet, so I don’t have an answer.

Beverly


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 9:54 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Sorry Harsha, but i’m not entirely sure what you’re looking for.

If you’re trying to setup a breakpoint so that you can catch the driver loading during the device installation, you can still use the HostProcessDbgBreakOnStart value since the host-GUID exists before your device is installed.

If you want to set a breakpoint in your driver before the driver has loaded & you’re using a user-mode debugger like cdb or ntsd, you can set a deferrred breakpoint using the BU command (bu mydriver!DllMain) which the debugger will try to resolve whenever it sees MyDriver load. I don’t believe these work in the kernel-mode debugger unfortunately.

An altermative is to add a call to DbgBreakPoint() to your driver (you may have to define the prototype for this yourself). This will cause the driver to first drop into the debugger (checks user-mode debugger first, then kernel debugger) but the driver will exit if neither is attached.

There’s another registry entry that i’ll have to lookup when i get in which allows you to break after your driver has been loaded. You’ll miss the call to DllMain this way but all your symbols will be in place.

Let me know if any of these options is what you were asking for, or if your question was something else.

-p


From: xxxxx@lists.osr.com on behalf of Harsha HS
Sent: Wed 5/10/2006 4:26 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter Wieland,

I could able to set break point in the UMDF driver, But I can put it only after completly loading the UMDF driver. I want to give Initial break point so that while installing only I want see control hitting the breakpoint.
To enable Initial break point we have to set flag HostProcessDbgBreakOnStart in the UMDF_Host key to TRUE.I searched for flag HostProcessDbgBreakOnStart in the registry and I could not find it.

Could pls help me out in the setting the Initial break point in UMDF driver.

Thanks and regards
-Harsha

Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

Harsha HS wrote:

Hi Peter Wieland,

Thankyou very much
Its working now…
Now I am able to put break point in UMDF driver and able debugg it.
I exactly followed the steps given in WINDDK .
One more thing I did was, we have to rum windbg in elevated level(Run as administrator in windows vista) .I also cleared the file repository of the sample Umdf driver & did a fresh installation, because of this erlier there was mismatch in UMDF driver and symbol file.

Thanks
-Harsha

Peter Wieland wrote:

You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote:

are the symbols in your symbol path?

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha


Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Blab-away for as little as 1?/min. Make PC-to-Phone Calls http: using Yahoo! Messenger with Voice. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:></http:></http:></http:>

yes - that’s another good interpretation of the question :slight_smile:

The value is under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services{193a1820-d9ac-4997-8c55-be817523f6aa}

-p


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 8:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

I think the OP is having a hard time finding the right place in the registry to set HostProcessDbgBreakOnStart

Perhaps you could give the full key path? I have not done any UMDF work yet, so I don’t have an answer.

Beverly


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 9:54 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Sorry Harsha, but i’m not entirely sure what you’re looking for.

If you’re trying to setup a breakpoint so that you can catch the driver loading during the device installation, you can still use the HostProcessDbgBreakOnStart value since the host-GUID exists before your device is installed.

If you want to set a breakpoint in your driver before the driver has loaded & you’re using a user-mode debugger like cdb or ntsd, you can set a deferrred breakpoint using the BU command (bu mydriver!DllMain) which the debugger will try to resolve whenever it sees MyDriver load. I don’t believe these work in the kernel-mode debugger unfortunately.

An altermative is to add a call to DbgBreakPoint() to your driver (you may have to define the prototype for this yourself). This will cause the driver to first drop into the debugger (checks user-mode debugger first, then kernel debugger) but the driver will exit if neither is attached.

There’s another registry entry that i’ll have to lookup when i get in which allows you to break after your driver has been loaded. You’ll miss the call to DllMain this way but all your symbols will be in place.

Let me know if any of these options is what you were asking for, or if your question was something else.

-p


From: xxxxx@lists.osr.com on behalf of Harsha HS
Sent: Wed 5/10/2006 4:26 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter Wieland,

I could able to set break point in the UMDF driver, But I can put it only after completly loading the UMDF driver. I want to give Initial break point so that while installing only I want see control hitting the breakpoint.
To enable Initial break point we have to set flag HostProcessDbgBreakOnStart in the UMDF_Host key to TRUE.I searched for flag HostProcessDbgBreakOnStart in the registry and I could not find it.

Could pls help me out in the setting the Initial break point in UMDF driver.

Thanks and regards
-Harsha

Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

Harsha HS wrote:

Hi Peter Wieland,

Thankyou very much
Its working now…
Now I am able to put break point in UMDF driver and able debugg it.
I exactly followed the steps given in WINDDK .
One more thing I did was, we have to rum windbg in elevated level(Run as administrator in windows vista) .I also cleared the file repository of the sample Umdf driver & did a fresh installation, because of this erlier there was mismatch in UMDF driver and symbol file.

Thanks
-Harsha

Peter Wieland wrote:

You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote:

are the symbols in your symbol path?

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha


Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Blab-away for as little as 1?/min. Make PC-to-Phone Calls http: using Yahoo! Messenger with Voice. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:></http:></http:></http:>

HI Peter Wieland ,

Yes Peter I was looking for this

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services{193a1820-d9ac-4997-8c55-be817523f6aa}

I could able to trace up to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services\

Under Services I did not find any key named
{193a1820-d9ac-4997-8c55-be817523f6aa}.
The Services key is empty.

I would like to know
what is is this {193a1820-d9ac-4997-8c55-be817523f6aa}?
Whether it will be there in the Services key by default?
Whether it will created during installation UMDF driver?
Can I manually create this key under Services and put HostProcessDbgBreakOnStart flag in that key?

Thanks and Regards
-Harsha

Peter Wieland wrote:
yes - that’s another good interpretation of the question :slight_smile:

The value is under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services{193a1820-d9ac-4997-8c55-be817523f6aa}
-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 8:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

I think the OP is having a hard time finding the right place in the registry to set HostProcessDbgBreakOnStart

Perhaps you could give the full key path? I have not done any UMDF work yet, so I don’t have an answer.

Beverly

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 9:54 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Sorry Harsha, but i’m not entirely sure what you’re looking for.

If you’re trying to setup a breakpoint so that you can catch the driver loading during the device installation, you can still use the HostProcessDbgBreakOnStart value since the host-GUID exists before your device is installed.

If you want to set a breakpoint in your driver before the driver has loaded & you’re using a user-mode debugger like cdb or ntsd, you can set a deferrred breakpoint using the BU command (bu mydriver!DllMain) which the debugger will try to resolve whenever it sees MyDriver load. I don’t believe these work in the kernel-mode debugger unfortunately.

An altermative is to add a call to DbgBreakPoint() to your driver (you may have to define the prototype for this yourself). This will cause the driver to first drop into the debugger (checks user-mode debugger first, then kernel debugger) but the driver will exit if neither is attached.

There’s another registry entry that i’ll have to lookup when i get in which allows you to break after your driver has been loaded. You’ll miss the call to DllMain this way but all your symbols will be in place.

Let me know if any of these options is what you were asking for, or if your question was something else.

-p

---------------------------------
From: xxxxx@lists.osr.com on behalf of Harsha HS
Sent: Wed 5/10/2006 4:26 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter Wieland,

I could able to set break point in the UMDF driver, But I can put it only after completly loading the UMDF driver. I want to give Initial break point so that while installing only I want see control hitting the breakpoint.
To enable Initial break point we have to set flag HostProcessDbgBreakOnStart in the UMDF_Host key to TRUE.I searched for flag HostProcessDbgBreakOnStart in the registry and I could not find it.

Could pls help me out in the setting the Initial break point in UMDF driver.

Thanks and regards
-Harsha

Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

Harsha HS wrote:
Hi Peter Wieland,

Thankyou very much
Its working now…
Now I am able to put break point in UMDF driver and able debugg it.
I exactly followed the steps given in WINDDK .
One more thing I did was, we have to rum windbg in elevated level(Run as administrator in windows vista) .I also cleared the file repository of the sample Umdf driver & did a fresh installation, because of this erlier there was mismatch in UMDF driver and symbol file.

Thanks
-Harsha

Peter Wieland wrote:
You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote: are the symbols in your symbol path?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.

What version of Vista are you using? IT should be placed there by default.

-p


From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Wednesday, May 10, 2006 11:33 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

HI Peter Wieland ,

Yes Peter I was looking for this

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services{193a1820-d9ac-4997-8c55-be817523f6aa}

I could able to trace up to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services\

Under Services I did not find any key named
{193a1820-d9ac-4997-8c55-be817523f6aa}.
The Services key is empty.

I would like to know
what is is this {193a1820-d9ac-4997-8c55-be817523f6aa}?
Whether it will be there in the Services key by default?
Whether it will created during installation UMDF driver?
Can I manually create this key under Services and put HostProcessDbgBreakOnStart flag in that key?

Thanks and Regards
-Harsha

Peter Wieland wrote:

yes - that’s another good interpretation of the question :slight_smile:

The value is under:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services{193a1820-d9ac-4997-8c55-be817523f6aa}

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 8:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

I think the OP is having a hard time finding the right place in the registry to set HostProcessDbgBreakOnStart

Perhaps you could give the full key path? I have not done any UMDF work yet, so I don’t have an answer.

Beverly



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 9:54 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Sorry Harsha, but i’m not entirely sure what you’re looking for.

If you’re trying to setup a breakpoint so that you can catch the driver loading during the device installation, you can still use the HostProcessDbgBreakOnStart value since the host-GUID exists before your device is installed.

If you want to set a breakpoint in your driver before the driver has loaded & you’re using a user-mode debugger like cdb or ntsd, you can set a deferrred breakpoint using the BU command (bu mydriver!DllMain) which the debugger will try to resolve whenever it sees MyDriver load. I don’t believe these work in the kernel-mode debugger unfortunately.

An altermative is to add a call to DbgBreakPoint() to your driver (you may have to define the prototype for this yourself). This will cause the driver to first drop into the debugger (checks user-mode debugger first, then kernel debugger) but the driver will exit if neither is attached.

There’s another registry entry that i’ll have to lookup when i get in which allows you to break after your driver has been loaded. You’ll miss the call to DllMain this way but all your symbols will be in place.

Let me know if any of these options is what you were asking for, or if your question was something else.

-p



From: xxxxx@lists.osr.com on behalf of Harsha HS
Sent: Wed 5/10/2006 4:26 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter Wieland,

I could able to set break point in the UMDF driver, But I can put it only after completly loading the UMDF driver. I want to give Initial break point so that while installing only I want see control hitting the breakpoint.
To enable Initial break point we have to set flag HostProcessDbgBreakOnStart in the UMDF_Host key to TRUE.I searched for flag HostProcessDbgBreakOnStart in the registry and I could not find it.

Could pls help me out in the setting the Initial break point in UMDF driver.

Thanks and regards
-Harsha

Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

Harsha HS wrote:

Hi Peter Wieland,

Thankyou very much
Its working now…
Now I am able to put break point in UMDF driver and able debugg it.
I exactly followed the steps given in WINDDK .
One more thing I did was, we have to rum windbg in elevated level(Run as administrator in windows vista) .I also cleared the file repository of the sample Umdf driver & did a fresh installation, because of this erlier there was mismatch in UMDF driver and symbol file.

Thanks
-Harsha

Peter Wieland wrote:

You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote:

are the symbols in your symbol path?

-p



From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha


Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1?/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer http:

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day http: — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Blab-away for as little as 1?/min. Make PC-to-Phone Calls http: using Yahoo! Messenger with Voice. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer



Yahoo! Messenger with Voice. Make PC-to-Phone Calls http: to the US (and 30+ countries) for 2?/min or less. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer</http:></http:></http:></http:></http:>

HI Peter,

I was using version 5308.That key was not there in the rgistry.
Today I installed 5381.I will check and let U know abt that.

Thanks
-Harsha

Peter Wieland wrote:
What version of Vista are you using? IT should be placed there by default.

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Wednesday, May 10, 2006 11:33 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

HI Peter Wieland ,

Yes Peter I was looking for this

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services{193a1820-d9ac-4997-8c55-be817523f6aa}

I could able to trace up to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services<br>
Under Services I did not find any key named
{193a1820-d9ac-4997-8c55-be817523f6aa}.
The Services key is empty.

I would like to know
what is is this {193a1820-d9ac-4997-8c55-be817523f6aa}?
Whether it will be there in the Services key by default?
Whether it will created during installation UMDF driver?
Can I manually create this key under Services and put HostProcessDbgBreakOnStart flag in that key?

Thanks and Regards
-Harsha

Peter Wieland wrote:
yes - that’s another good interpretation of the question :slight_smile:

The value is under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services{193a1820-d9ac-4997-8c55-be817523f6aa}
-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 8:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

I think the OP is having a hard time finding the right place in the registry to set HostProcessDbgBreakOnStart

Perhaps you could give the full key path? I have not done any UMDF work yet, so I don’t have an answer.

Beverly

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 9:54 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Sorry Harsha, but i’m not entirely sure what you’re looking for.

If you’re trying to setup a breakpoint so that you can catch the driver loading during the device installation, you can still use the HostProcessDbgBreakOnStart value since the host-GUID exists before your device is installed.

If you want to set a breakpoint in your driver before the driver has loaded & you’re using a user-mode debugger like cdb or ntsd, you can set a deferrred breakpoint using the BU command (bu mydriver!DllMain) which the debugger will try to resolve whenever it sees MyDriver load. I don’t believe these work in the kernel-mode debugger unfortunately.

An altermative is to add a call to DbgBreakPoint() to your driver (you may have to define the prototype for this yourself). This will cause the driver to first drop into the debugger (checks user-mode debugger first, then kernel debugger) but the driver will exit if neither is attached.

There’s another registry entry that i’ll have to lookup when i get in which allows you to break after your driver has been loaded. You’ll miss the call to DllMain this way but all your symbols will be in place.

Let me know if any of these options is what you were asking for, or if your question was something else.

-p

---------------------------------
From: xxxxx@lists.osr.com on behalf of Harsha HS
Sent: Wed 5/10/2006 4:26 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter Wieland,

I could able to set break point in the UMDF driver, But I can put it only after completly loading the UMDF driver. I want to give Initial break point so that while installing only I want see control hitting the breakpoint.
To enable Initial break point we have to set flag HostProcessDbgBreakOnStart in the UMDF_Host key to TRUE.I searched for flag HostProcessDbgBreakOnStart in the registry and I could not find it.

Could pls help me out in the setting the Initial break point in UMDF driver.

Thanks and regards
-Harsha

Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

Harsha HS wrote:
Hi Peter Wieland,

Thankyou very much
Its working now…
Now I am able to put break point in UMDF driver and able debugg it.
I exactly followed the steps given in WINDDK .
One more thing I did was, we have to rum windbg in elevated level(Run as administrator in windows vista) .I also cleared the file repository of the sample Umdf driver & did a fresh installation, because of this erlier there was mismatch in UMDF driver and symbol file.

Thanks
-Harsha

Peter Wieland wrote:
You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote: are the symbols in your symbol path?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates.

HI Peter,

I could see the key {193a1820-d9ac-4997-8c55-be817523f6aa} under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services\ in version 5381.

I will try to set the flag for Initial breakpoint and let you know about the findings

Thanks
-Harsha

Harsha HS wrote:
HI Peter,

I was using version 5308.That key was not there in the rgistry.
Today I installed 5381.I will check and let U know abt that.

Thanks
-Harsha

Peter Wieland wrote:
What version of Vista are you using? IT should be placed there by default.

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Wednesday, May 10, 2006 11:33 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

HI Peter Wieland ,

Yes Peter I was looking for this

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services{193a1820-d9ac-4997-8c55-be817523f6aa}

I could able to trace up to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services<br>
Under Services I did not find any key named
{193a1820-d9ac-4997-8c55-be817523f6aa}.
The Services key is empty.

I would like to know
what is is this {193a1820-d9ac-4997-8c55-be817523f6aa}?
Whether it will be there in the Services key by default?
Whether it will created during installation UMDF driver?
Can I manually create this key under Services and put HostProcessDbgBreakOnStart flag in that key?

Thanks and Regards
-Harsha

Peter Wieland wrote:
yes - that’s another good interpretation of the question :slight_smile:

The value is under:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\WUDF\Services{193a1820-d9ac-4997-8c55-be817523f6aa}
-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Brown, Beverly
Sent: Wednesday, May 10, 2006 8:01 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

I think the OP is having a hard time finding the right place in the registry to set HostProcessDbgBreakOnStart

Perhaps you could give the full key path? I have not done any UMDF work yet, so I don’t have an answer.

Beverly

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Peter Wieland
Sent: Wednesday, May 10, 2006 9:54 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Sorry Harsha, but i’m not entirely sure what you’re looking for.

If you’re trying to setup a breakpoint so that you can catch the driver loading during the device installation, you can still use the HostProcessDbgBreakOnStart value since the host-GUID exists before your device is installed.

If you want to set a breakpoint in your driver before the driver has loaded & you’re using a user-mode debugger like cdb or ntsd, you can set a deferrred breakpoint using the BU command (bu mydriver!DllMain) which the debugger will try to resolve whenever it sees MyDriver load. I don’t believe these work in the kernel-mode debugger unfortunately.

An altermative is to add a call to DbgBreakPoint() to your driver (you may have to define the prototype for this yourself). This will cause the driver to first drop into the debugger (checks user-mode debugger first, then kernel debugger) but the driver will exit if neither is attached.

There’s another registry entry that i’ll have to lookup when i get in which allows you to break after your driver has been loaded. You’ll miss the call to DllMain this way but all your symbols will be in place.

Let me know if any of these options is what you were asking for, or if your question was something else.

-p

---------------------------------
From: xxxxx@lists.osr.com on behalf of Harsha HS
Sent: Wed 5/10/2006 4:26 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter Wieland,

I could able to set break point in the UMDF driver, But I can put it only after completly loading the UMDF driver. I want to give Initial break point so that while installing only I want see control hitting the breakpoint.
To enable Initial break point we have to set flag HostProcessDbgBreakOnStart in the UMDF_Host key to TRUE.I searched for flag HostProcessDbgBreakOnStart in the registry and I could not find it.

Could pls help me out in the setting the Initial break point in UMDF driver.

Thanks and regards
-Harsha

Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

Harsha HS wrote:
Hi Peter Wieland,

Thankyou very much
Its working now…
Now I am able to put break point in UMDF driver and able debugg it.
I exactly followed the steps given in WINDDK .
One more thing I did was, we have to rum windbg in elevated level(Run as administrator in windows vista) .I also cleared the file repository of the sample Umdf driver & did a fresh installation, because of this erlier there was mismatch in UMDF driver and symbol file.

Thanks
-Harsha

Peter Wieland wrote:
You’re trying to set a breakpoint by opening your source file thruogh the file menu aren’t you. I suspect your driver isn’t yet loaded, and so WinDBG has absoutely no idea what module the source file you opened is part of. Even if your driver is loaded, WINDBG cannot match an arbitrary source file you’ve opened to a particular module.

Set the breakpoint from the command line instead. “bu MyUmdfDriver!CMyDriver::OnDeviceAdd” will create an “unresolved breakpoint” which the debugger will attempt to resolve each time it loads a module.

I presume you’re doing this all by attaching windbg to WUDFHOST.EXE? Have you set the registry flag that stalls host startup until a debugger is attached (HostProcessDbgBreakOnStart)?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Sunday, April 23, 2006 11:19 PM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] UMDF driver debugging

Hi Peter,

The moment I try to put break point on any of the line in UMDF driver, a message pops up saying

“Symbol Information for the current line could not be located in the currently loaded symbols.
Do you want the debugger to load and search the remaining Symbols?

Yes performs the search immediately
No returns to the UI while the search proceeds
Cancel exists the operation”

And if U select yes, it pops up

“Code not found”

Thanks
-Harsha

Peter Wieland wrote: are the symbols in your symbol path?

-p

---------------------------------
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of Harsha HS
Sent: Thursday, April 20, 2006 9:07 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] UMDF driver debugging

Hi,

Has anybody had done UMDF(Windows vista)driver debugging?
We are using Windbg to debug umdf driver. It is asking for
symbols eventhough the umdf driver symbols(umdfdriver.pdb) files are
available in the same PC as I built the UMDF driver in checked build environment.
I did not get what symbols it is asking for?

Thanks
-Harsha

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls. Great rates starting at 1¢/min. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Celebrate Earth Day everyday! Discover 10 things you can do to help slow climate change. Yahoo! Earth Day — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Blab-away for as little as 1¢/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer


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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

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

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
How low will we go? Check out Yahoo! Messenger’s low PC-to-Phone call rates. — Questions? First check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256 To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.