.kdfiles won't override a driver

I am trying to replace a driver on my debug system.
This has worked in the past, but today it is just not happening.

kd> .kdfiles
KD file assocations loaded from ‘c:\drv\drv.ini’
\systemroot\system32\drivers\pmc80xx.sys -> c:\drv\pmc80xx.sys
kd> bp pmc80xx!driverentry
*** ERROR: Module load completed but symbols could not be loaded for PMC80XX.SYS
Couldn’t resolve error at ‘pmc80xx!driverentry’

Does the ERROR message mean that the driver has already been loaded?
That might explain why .kdfiles is not helping.

When you say that it used to work, do you mean this exact configuration
(HOST, TARGET & MAPFILE) or that you’ve had it worked before with a
different configuration?

mm

On Mon, Sep 27, 2010 at 6:08 PM, wrote:

> I am trying to replace a driver on my debug system.
> This has worked in the past, but today it is just not happening.
>
> kd> .kdfiles
> KD file assocations loaded from ‘c:\drv\drv.ini’
> \systemroot\system32\drivers\pmc80xx.sys -> c:\drv\pmc80xx.sys
> kd> bp pmc80xx!driverentry
> *** ERROR: Module load completed but symbols could not be loaded for
> PMC80XX.SYS
> Couldn’t resolve error at ‘pmc80xx!driverentry’
>
> Does the ERROR message mean that the driver has already been loaded?
> That might explain why .kdfiles is not helping.
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

I have used .kdfiles with this driver on this exact system.

I may have used the -m directive instead of the mapfile.
But that option is not working either at the moment.

Does that path you supplied exactly match the one that is configured on the target system (case sensitive)?

Boot the target with the debugger attached and with kd protocol debugging (Ctrl-Alt-D or Ctrl-D in kd.exe) turned on and look at the file name requested for your driver to double check.

  • S

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@pmc-sierra.com
Sent: Monday, September 27, 2010 3:21 PM
To: Kernel Debugging Interest List
Subject: RE:[windbg] .kdfiles won’t override a driver

I have used .kdfiles with this driver on this exact system.

I may have used the -m directive instead of the mapfile.
But that option is not working either at the moment.


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

That’s where I was heading as well - the paths much match exactly (other
than case), so if you’ve modified something, I’d check this first.

Could you please post your map file?

mm

On Mon, Sep 27, 2010 at 6:22 PM, Skywing wrote:

> Does that path you supplied exactly match the one that is configured on the
> target system (case sensitive)?
>
> Boot the target with the debugger attached and with kd protocol debugging
> (Ctrl-Alt-D or Ctrl-D in kd.exe) turned on and look at the file name
> requested for your driver to double check.
>
> - S
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] On Behalf Of xxxxx@pmc-sierra.com
> Sent: Monday, September 27, 2010 3:21 PM
> To: Kernel Debugging Interest List
> Subject: RE:[windbg] .kdfiles won’t override a driver
>
> I have used .kdfiles with this driver on this exact system.
>
> I may have used the -m directive instead of the mapfile.
> But that option is not working either at the moment.
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

John,

Chances are you changed something and the new SYS files are now located in a
different path. I’d use a command line and find the SYS files and be sure
they agree with your INI file.

Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@pmc-sierra.com
Sent: Monday, September 27, 2010 4:21 PM
To: Kernel Debugging Interest List
Subject: RE:[windbg] .kdfiles won’t override a driver

I have used .kdfiles with this driver on this exact system.

I may have used the -m directive instead of the mapfile.
But that option is not working either at the moment.


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Here is the map file:

map
\systemroot\system32\drivers\pmc80xx.sys
c:\drv\pmc80xx.sys

I also tried .kdfiles -m \Systemroot\system32\drivers\pmc80xx.sys c:\drv\pmc80xx.sys

Can you be more specific about enabling the kd protocol debugging?

And the paths to the SYS files .

Gary G. Little

H (952) 223-1349

C (952) 454-4629

xxxxx@comcast.net

From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Martin O’Brien
Sent: Monday, September 27, 2010 4:28 PM
To: Kernel Debugging Interest List
Subject: Re: RE:[windbg] .kdfiles won’t override a driver

That’s where I was heading as well - the paths much match exactly (other
than case), so if you’ve modified something, I’d check this first.

Could you please post your map file?

mm

On Mon, Sep 27, 2010 at 6:22 PM, Skywing
wrote:

Does that path you supplied exactly match the one that is configured on the
target system (case sensitive)?

Boot the target with the debugger attached and with kd protocol debugging
(Ctrl-Alt-D or Ctrl-D in kd.exe) turned on and look at the file name
requested for your driver to double check.

- S

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@pmc-sierra.com
Sent: Monday, September 27, 2010 3:21 PM
To: Kernel Debugging Interest List
Subject: RE:[windbg] .kdfiles won’t override a driver

I have used .kdfiles with this driver on this exact system.

I may have used the -m directive instead of the mapfile.
But that option is not working either at the moment.


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

— WINDBG is sponsored by OSR For our schedule of WDF, WDM, debugging and
other seminars visit: http://www.osr.com/seminars To unsubscribe, visit the
List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

What’s the value of the ‘ImagePath’ service registry entry?

Protocol Debugging: CTRL+ALT+D

mm

On Mon, Sep 27, 2010 at 6:39 PM, Gary G. Little wrote:

> And the paths to the SYS files ?
>
>
>
> Gary G. Little
>
> H (952) 223-1349
>
> C (952) 454-4629
>
> xxxxx@comcast.net
>
>
>
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] *On Behalf Of *Martin O’Brien
> Sent: Monday, September 27, 2010 4:28 PM
> To: Kernel Debugging Interest List
> Subject: Re: RE:[windbg] .kdfiles won’t override a driver
>
>
>
> That’s where I was heading as well - the paths much match exactly (other
> than case), so if you’ve modified something, I’d check this first.
>
> Could you please post your map file?
>
>
> mm
>
>
> On Mon, Sep 27, 2010 at 6:22 PM, Skywing
> wrote:
>
> Does that path you supplied exactly match the one that is configured on the
> target system (case sensitive)?
>
> Boot the target with the debugger attached and with kd protocol debugging
> (Ctrl-Alt-D or Ctrl-D in kd.exe) turned on and look at the file name
> requested for your driver to double check.
>
> - S
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com [mailto:
> xxxxx@lists.osr.com] On Behalf Of xxxxx@pmc-sierra.com
> Sent: Monday, September 27, 2010 3:21 PM
> To: Kernel Debugging Interest List
> Subject: RE:[windbg] .kdfiles won’t override a driver
>
> I have used .kdfiles with this driver on this exact system.
>
> I may have used the -m directive instead of the mapfile.
> But that option is not working either at the moment.
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> — WINDBG is sponsored by OSR For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

If you’re using windbg, press ctrl-alt-d. if you’re using kd, press ctrl-d. Then, reboot the target machine while the debugger is active and you should see additional debug output, including which filenames are being requested for kdfiles matches.

  • S

-----Original Message-----
From: xxxxx@lists.osr.com [mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@pmc-sierra.com
Sent: Monday, September 27, 2010 3:37 PM
To: Kernel Debugging Interest List
Subject: RE:[windbg] .kdfiles won’t override a driver

Here is the map file:

map
\systemroot\system32\drivers\pmc80xx.sys
c:\drv\pmc80xx.sys

I also tried .kdfiles -m \Systemroot\system32\drivers\pmc80xx.sys c:\drv\pmc80xx.sys

Can you be more specific about enabling the kd protocol debugging?


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Ah ha … I had the same issue and I had to change my map file to look like
this:

map
??\C:\Windows\system32\drivers\ICEDriverV3.sys
C:\Projects\GGLC\SynergiesDesign\SynergiesDesignICE\InternetControlEngine\IC
EDriverV3\Packages\Vista_AMD64\IceDriverV3.sys

I had to replace “\SystemRoot\drivers” with the explicit
“??\C:\Windows\system32\drivers”

Gary G. Little
H (952) 223-1349
C (952) 454-4629
xxxxx@comcast.net

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@pmc-sierra.com
Sent: Monday, September 27, 2010 4:37 PM
To: Kernel Debugging Interest List
Subject: RE:[windbg] .kdfiles won’t override a driver

Here is the map file:

map
\systemroot\system32\drivers\pmc80xx.sys
c:\drv\pmc80xx.sys

I also tried .kdfiles -m \Systemroot\system32\drivers\pmc80xx.sys
c:\drv\pmc80xx.sys

Can you be more specific about enabling the kd protocol debugging?


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

The path to the driver file (storport) is always \windows\system32\drivers\pmc80xx.sys.

I tried another version and it also failed:

3: kd> .kdfiles -c
KD file associations cleared
3: kd> .kdfiles -m ??\C:\Windows\system32\drivers\pmc80xx.sys c:\drv\pmc80xx.sys
Added mapping for ‘??\C:\Windows\system32\drivers\pmc80xx.sys’
3: kd> g

DriverEntry driverObject=FFFFFA80078A8E70 argument2=FFFFF800008617F0 returnValue@ FFFFF880009A9800 BuildValue=2 DpcEnabled=Yes MSISupport=1

I did not see anything else after hitting ctrl-alt-d and rebooting.

SystemRoot <et. c.> will work fine, so long as you you use it in both places
(map file, ImagePath).

mm

On Mon, Sep 27, 2010 at 6:55 PM, wrote:

> The path to the driver file (storport) is always
> \windows\system32\drivers\pmc80xx.sys.
>
> I tried another version and it also failed:
>
> 3: kd> .kdfiles -c
> KD file associations cleared
> 3: kd> .kdfiles -m ??\C:\Windows\system32\drivers\pmc80xx.sys
> c:\drv\pmc80xx.sys
> Added mapping for ‘??\C:\Windows\system32\drivers\pmc80xx.sys’
> 3: kd> g
>
> DriverEntry driverObject=FFFFFA80078A8E70 argument2=FFFFF800008617F0
> returnValue@ FFFFF880009A9800 BuildValue=2 DpcEnabled=Yes MSISupport=1
>
> I did not see anything else after hitting ctrl-alt-d and rebooting.
>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
></et.>

I did get the debug output from kd but it does not show much.
I see no references about attempting to load my driver and then I see output from my
initialization process.

READ: Wait for type 7 packet
READ: Error 80070079.
READ: Wait for type 7 packet
READ: Error 80070079.
READ: Wait for type 7 packet
PacketType=3, ByteCount=9e, PacketId=33e,
READ: Received Type 3 data packet with id = 33e successfully.

DriverEntry driverObject=FFFFFA8007896120 argument2=FFFFF80000861820 returnValue@ FFFFF880009A9800 BuildValue=2 DpcEnabled=Yes MSISupport=1
READ: Error 80070079.
READ: Wait for type 7 packet
READ: Error 80070079.
READ: Wait for type 7 packet
PacketType=3, ByteCount=5b, PacketId=33f,
READ: Received Type 3 data packet with id = 33f successfully.

HWFindAdapter: ***********************************************************
PacketType=3, ByteCount=5b, PacketId=340,
READ: Received Type 3 data packet with id = 340 successfully.

HWFindAdapter: ******************** ****************
PacketType=3, ByteCount=59, PacketId=341,
READ: Received Type 3 data packet with id = 341 successfully.

HWFindAdapter: ******************** PCIBus= 6 PCISlot= 0 ***************
PacketType=3, ByteCount=5e, PacketId=342,
READ: Received Type 3 data packet with id = 342 successfully.

I’m confused - it looks like it is loading, so what’s the problem? Wrong
version?

Mm

On Sep 27, 2010 7:02 PM, wrote:
> I did get the debug output from kd but it does not show much.
> I see no references about attempting to load my driver and then I see
output from my
> initialization process.
>
> READ: Wait for type 7 packet
> READ: Error 80070079.
> READ: Wait for type 7 packet
> READ: Error 80070079.
> READ: Wait for type 7 packet
> PacketType=3, ByteCount=9e, PacketId=33e,
> READ: Received Type 3 data packet with id = 33e successfully.
>
>
> DriverEntry driverObject=FFFFFA8007896120 argument2=FFFFF80000861820
returnValue@ FFFFF880009A9800 BuildValue=2 DpcEnabled=Yes MSISupport=1
> READ: Error 80070079.
> READ: Wait for type 7 packet
> READ: Error 80070079.
> READ: Wait for type 7 packet
> PacketType=3, ByteCount=5b, PacketId=33f,
> READ: Received Type 3 data packet with id = 33f successfully.
>
> HWFindAdapter: ***********************************
> PacketType=3, ByteCount=5b, PacketId=340,
> READ: Received Type 3 data packet with id = 340 successfully.
>
> HWFindAdapter:

> PacketType=3, ByteCount=59, PacketId=341,
> READ: Received Type 3 data packet with id = 341 successfully.
>
> HWFindAdapter:
PCIBus= 6 PCISlot= 0 ***************
> PacketType=3, ByteCount=5e, PacketId=342,
> READ: Received Type 3 data packet with id = 342 successfully.
>
>
> —
> WINDBG is sponsored by OSR
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer

Also, what’s the version of your target?

On Sep 27, 2010 7:11 PM, “Martin O’Brien” <
xxxxx@gmail.com> wrote:

I’m confused - it looks like it is loading, so what’s the problem? Wrong
version?

Mm

On Sep 27, 2010 7:02 PM, wrote:
>> I did get the debug output from kd but it does not show much.
>> I see no references about attempting to load my driver and then I see
> output from my
>> initialization process.
>>
>> READ: Wait for type 7 packet
>> READ: Error 80070079.
>> READ: Wait for type 7 packet
>> READ: Error 80070079.
>> READ: Wait for type 7 packet
>> PacketType=3, ByteCount=9e, PacketId=33e,
>> READ: Received Type 3 data packet with id = 33e successfully.
>>
>>
>> DriverEntry driverObject=FFFFFA8007896120 argument2=FFFFF80000861820
> returnValue@ FFFFF880009A9800 BuildValue=2 DpcEnabled=Yes MSISupport=1
>> READ: Error 80070079.
>> READ: Wait for type 7 packet
>> READ: Error 80070079.
>> READ: Wait for type 7 packet
>> PacketType=3, ByteCount=5b, PacketId=33f,
>> READ: Received Type 3 data packet with id = 33f successfully.
>>
>> HWFindAdapter:
***********************************
>> PacketType=3, ByteCount=5b, PacketId=340,
>> READ: Received Type 3 data packet with id = 340 successfully.
>>
>> HWFindAdapter:

>> PacketType=3, ByteCount=59, PacketId=341,
>> READ: Received Type 3 data packet with id = 341 successfully.
>>
>> HWFindAdapter:
PCIBus= 6 PCISlot= 0 ***************
>> PacketType=3, ByteCount=5e, PacketId=342,
>> READ: Received Type 3 data packet with id = 342 successfully.
>>
>>
>> —
>> WINDBG is sponsored by OSR
>>
>> For our schedule of WDF, WDM, debugging and other seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer

The target is running Server2008 R2.

A driver loads but it is the wrong one. There should be some additional output about loading a kdfiles version before the driver actually loads.

Once the system is booted I can’t even uninstall or disable the driver. When I attempt to do that, the system gets stuck and displays an hourglass indefinitely.

I am getting ready to just install a new version of the OS in a different volume.

Does everything ‘work’ with ‘.kdfiles -c’ (delete mapping) followed be a
reboot (without .kdfiles)?

mm

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of
xxxxx@pmc-sierra.com
Sent: Monday, September 27, 2010 7:22 PM
To: Kernel Debugging Interest List
Subject: RE:[windbg] .kdfiles won’t override a driver

The target is running Server2008 R2.

A driver loads but it is the wrong one. There should be some additional
output about loading a kdfiles version before the driver actually loads.

Once the system is booted I can’t even uninstall or disable the driver. When
I attempt to do that, the system gets stuck and displays an hourglass
indefinitely.

I am getting ready to just install a new version of the OS in a different
volume.


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

Sounds like you did not connect the debugger early enough… Hitting ctrl-c during boot might help.

I saw that you mentioned that this was a storport driver, if you are a boot start driver then you’ll have to turn on boot loader debugging (bcdedit /set bootdebug yes) to kdfiles your driver over (if you’ve not done so already).

  • S

-----Original Message-----
From: xxxxx@pmc-sierra.com
Sent: Monday, September 27, 2010 16:02
To: Kernel Debugging Interest List
Subject: RE:[windbg] .kdfiles won’t override a driver

I did get the debug output from kd but it does not show much.
I see no references about attempting to load my driver and then I see output from my
initialization process.

READ: Wait for type 7 packet
READ: Error 80070079.
READ: Wait for type 7 packet
READ: Error 80070079.
READ: Wait for type 7 packet
PacketType=3, ByteCount=9e, PacketId=33e,
READ: Received Type 3 data packet with id = 33e successfully.

DriverEntry driverObject=FFFFFA8007896120 argument2=FFFFF80000861820 returnValue@ FFFFF880009A9800 BuildValue=2 DpcEnabled=Yes MSISupport=1
READ: Error 80070079.
READ: Wait for type 7 packet
READ: Error 80070079.
READ: Wait for type 7 packet
PacketType=3, ByteCount=5b, PacketId=33f,
READ: Received Type 3 data packet with id = 33f successfully.

HWFindAdapter: ***********************************
PacketType=3, ByteCount=5b, PacketId=340,
READ: Received Type 3 data packet with id = 340 successfully.

HWFindAdapter:

PacketType=3, ByteCount=59, PacketId=341,
READ: Received Type 3 data packet with id = 341 successfully.

HWFindAdapter:
PCIBus= 6 PCISlot= 0 ***************
PacketType=3, ByteCount=5e, PacketId=342,
READ: Received Type 3 data packet with id = 342 successfully.


WINDBG is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

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

I thought I was hitting CTRL-C as soon as I could.

The driver is not marked boot start because the Windows volume is on another adapter. That usually also makes the system happier if something bad happens when I am debugging the storport driver.

It would have been nice to discover what I was doing wrong but I eventually just gave up. It was easier to simply reinstall Windows and go on with other things.