Loading user symbols and setting breakpoints

First, let me state that I am new to WinDbg. What I have accomplished
so far is to:

1.Create a parallel port filter driver and build it with the DDK checked
build environment.

  1. Establish a serial link between my host and target computers (both
    running Windows XP (free not checked) )

  2. set the symbol file path for Windows XP from the symbol server and my
    driver - here is the path

SRV*c:\win_xp_symbols*http://msdl.microsoft.com/download/symbols;

C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386;

C:\WINDDK\3790.1830\src\wdm\par_io;

C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86

  1. start my filter driver (the one I need to debug) on the target system
  • I started it with the filtject dll that Walter Oney supplies in his
    companion documentation to his book “Programming the Microsoft Windows
    Driver Model” The only evidence I have that the driver has loaded is
    the registry
    HKEY_LOCAL_MACHINE-SYSTEM-CurrentControlSet-Enum-ACPI-PNP0401-4&F29DB88&
    0-UpperFilters = ppfilter, which is the name of my filter driver.

However, lm (list modules command) on the debugger of the host computer
does not list ppfilter as a module (should it??) AND

I am having problems setting a breakpoint in the driver - I can load the
source file, but when I try to set a breakpoint (by clicking on the hand
icon while the cursor is on the line where I want the break) I get this
message:

Symbol information for the current line could not be located in the
currently loaded symbols.

I have tried numerous times to reload the symbols, and ultimately, I set
the !sym noisy ‘flag’ to get the following output which is just a
snippet of what actually comes out. I’m afraid this means nothing to
me - hopefully someone out there will understand what it is trying to
tell me.

DBGHELP: C:\Program Files\Debugging Tools for Windows\i81xdnt5.dll -
file not found

DBGHELP: invalid path:
SRV*c:\win_xp_symbols*http://msdl.microsoft.com/download/symbols

DBGHELP: i81xdnt5.dll not found in
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386

DBGHELP: i81xdnt5.dll not found in C:\WINDDK\3790.1830\src\wdm\par_io

DBGHELP: i81xdnt5.dll not found in
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86

DBGENG: \SystemRoot\System32\i81xdnt5.dll - Image mapping disallowed by
non-local path.

DBGHELP: unrecognized OMF sig: b00 *** WARNING: Unable to verify
timestamp for i81xdnt5.dll

*** ERROR: Module load completed but symbols could not be loaded for
i81xdnt5.dll

DBGHELP: i81xdnt5 - no symbols loaded

DBGHELP:
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386\NAVENG.pdb - file
not found

DBGHELP:
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386\symbols\sys\NAVEN
G.pdb - file not found

DBGHELP:
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386\sys\NAVENG.pdb -
file not found

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\NAVENG.pdb - file not found

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\symbols\sys\NAVENG.pdb -
file not found

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\sys\NAVENG.pdb - file not
found

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\NAVENG.pdb -
file not found

DBGHELP:
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\symbols\sys\NAVENG.pdb

  • file not found

DBGHELP:
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\sys\NAVENG.pdb - file
not found

DBGHELP: C:\build\NAVENG.pdb - file not found

*** ERROR: Module load completed but symbols could not be loaded for
naveng.sys

Same kinds of messages for SYMREDRV.SYS, SYMTDI.SYS, SYMEVENT.SYS ETC
ETC

And just to round out the information, my driver is loaded from Drive C
of the target machine, my symbols are loaded from Drive C of my host
machine, is this a possible problem, should the driver by on a shared
network drive??

Thanks so much,

Stacy

“Stacy Meszaros” wrote in message:

>> However, lm (list modules command) on the debugger of the host computer
>> does not list ppfilter as a module (should it??) AND

Yes it should be there, so this is where a lot of your problems lie. Does
the registry contain a key “ppfilter” under services, with the correct data
for a kernel device driver?


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply

No, there is not ppfilter under services. Looks like I am doing
something wrong when loading the driver??

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 05, 2005 12:03 PM
To: Kernel Debugging Interest List
Subject: Re:[windbg] Loading user symbols and setting breakpoints

“Stacy Meszaros” wrote in message:

>> However, lm (list modules command) on the debugger of the host
computer
>> does not list ppfilter as a module (should it??) AND

Yes it should be there, so this is where a lot of your problems lie.
Does
the registry contain a key “ppfilter” under services, with the correct
data
for a kernel device driver?


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply


You are currently subscribed to windbg as: xxxxx@sensorswitch.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Yep, you absolutely need these entries to get the driver loaded. As a quick
and dirty you might try using OSR’s Driver Loader
http://www.osronline.com/article.cfm?article=157 to create these entries.

Don

“Stacy Meszaros” wrote in message
news:xxxxx@windbg…
No, there is not ppfilter under services. Looks like I am doing
something wrong when loading the driver??

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Don Burn
Sent: Wednesday, October 05, 2005 12:03 PM
To: Kernel Debugging Interest List
Subject: Re:[windbg] Loading user symbols and setting breakpoints

“Stacy Meszaros” wrote in message:

>> However, lm (list modules command) on the debugger of the host
computer
>> does not list ppfilter as a module (should it??) AND

Yes it should be there, so this is where a lot of your problems lie.
Does
the registry contain a key “ppfilter” under services, with the correct
data
for a kernel device driver?


Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply


You are currently subscribed to windbg as: xxxxx@sensorswitch.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Stacy Meszaros wrote:

First, let me state that I am new to WinDbg. What I have accomplished
so far is to:

1.Create a parallel port filter driver and build it with the DDK
checked build environment.

Are you an upper/lower filter for parport.sys, or are you a filter for a
device which uses parport.sys? (Ah, I see from the registry path below
that you are trying to be an upper filter to parport.sys.) What is your
overall goal here? Just curious. Not all parallel port device drivers
are particularly well-behaved.

  1. Establish a serial link between my host and target computers (both
    running Windows XP (free not checked) )

  2. set the symbol file path for Windows XP from the symbol server and
    my driver – here is the path

SRV*c:\win_xp_symbols*http://msdl.microsoft.com/download/symbols;

C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386;

C:\WINDDK\3790.1830\src\wdm\par_io;

C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86

You should not be building your own drivers inside the DDK’s build tree.
What happens when you upgrade to a new version of the DDK, which
installs a brand new top-level tree? Put your own drivers in a separate
directory. I do all of my development in folders of a tree called
“\dev”, for “development”, but the placement is up to you.

The symbols are located only in the objxxx_yyy_zzz\i386 directory.
There’s no point in adding the others. Further, I have found it to be a
mistake to embed “obhchk” or “objfre” in my symbol path. At some point,
you will want to switch back and forth, and it’s a pain to remember to
change the symbol path every time. Plus, you cannot rebuild your driver
while WinDbg has your symbol file open. Instead, create a separate
folder to hold your “current” binary and symbols, and copy them there
when you copy the .sys to your target system.

  1. start my filter driver (the one I need to debug) on the target
    system – I started it with the filtject dll that Walter Oney supplies
    in his companion documentation to his book “Programming the Microsoft
    Windows Driver Model” The only evidence I have that the driver has
    loaded is the registry
    HKEY_LOCAL_MACHINE-SYSTEM-CurrentControlSet-Enum-ACPI-PNP0401-4&F29DB88&0-UpperFilters
    = ppfilter, which is the name of my filter driver.

That doesn’t say the driver is loaded. That only says the driver is
partially configured. Don Burn has given you the rest of this story.

However, lm (list modules command) on the debugger of the host
computer does not list ppfilter as a module (should it??) AND

I am having problems setting a breakpoint in the driver – I can load
the source file, but when I try to set a breakpoint (by clicking on
the hand icon while the cursor is on the line where I want the break)
I get this message:

Symbol information for the current line could not be located in the
currently loaded symbols.

I have tried numerous times to reload the symbols, and ultimately, I
set the !sym noisy ‘flag’ to get the following output which is just a
snippet of what actually comes out. I’m afraid this means nothing to
me – hopefully someone out there will understand what it is trying to
tell me.

DBGHELP: C:\Program Files\Debugging Tools for Windows\i81xdnt5.dll -
file not found

DBGHELP: invalid path:
SRV*c:\win_xp_symbols*http://msdl.microsoft.com/download/symbols

Did you create a directory called c:\win_xp_symbols on the machine
running windbg? It doesn’t create one for you. Assuming that folder
exists, that path looks fine. Exactly which version of windbg are you using?

And just to round out the information, my driver is loaded from Drive
C of the target machine, my symbols are loaded from Drive C of my host
machine, is this a possible problem, should the driver by on a shared
network drive??

No, this is fine.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

My goal, which may have changed by the way to use USB port, is to simply
blow the fuse on a JTAG interface via the parallel port (or now USB)

I have tried two paths in parallel:

  1. to use the parport.sys driver as is and simply get a handle to it and
    read/write to the raw port - hasn’t been successful to date, I find the
    device path using calls to SetupDiGetClassDevsEx,
    SetupDiEnumDeviceInterfaces and SetupDiGetDeviceInterfaceDetail, and
    then to CreateFile using the DevicePath returned in the
    DeviceInterfaceDetailData structure. All seems to work fine, until I
    call ReadFile/WriteFile with the handle returned by CreateFile - return
    code 50
  2. to write a filter driver that sits on top of parport.sys and
    intercepts calls into the driver. In particular, the read and write, so
    that the filter can perform the operation via internal ioctl calls and
    return the value read or write the value to the port

While I may not need to continue persuing this, I am rather stubborn and
would (for my own sanity) like to resolve this. I know that there are
many devices out there that utilize the parallel port in many ways, so I
feel that there has to be a way to do this and that I have just missed
something probably quite obvious to someone else. How I long for that
simple out/in function/instruction of years gone by!!

Thanks for taking the time to help,
Stacy

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Wednesday, October 05, 2005 1:41 PM
To: Kernel Debugging Interest List
Subject: Re: [windbg] Loading user symbols and setting breakpoints

Stacy Meszaros wrote:

First, let me state that I am new to WinDbg. What I have accomplished
so far is to:

1.Create a parallel port filter driver and build it with the DDK
checked build environment.

Are you an upper/lower filter for parport.sys, or are you a filter for a

device which uses parport.sys? (Ah, I see from the registry path below
that you are trying to be an upper filter to parport.sys.) What is your
overall goal here? Just curious. Not all parallel port device drivers
are particularly well-behaved.

  1. Establish a serial link between my host and target computers (both
    running Windows XP (free not checked) )

  2. set the symbol file path for Windows XP from the symbol server and
    my driver - here is the path

SRV*c:\win_xp_symbols*http://msdl.microsoft.com/download/symbols;

C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386;

C:\WINDDK\3790.1830\src\wdm\par_io;

C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86

You should not be building your own drivers inside the DDK’s build tree.

What happens when you upgrade to a new version of the DDK, which
installs a brand new top-level tree? Put your own drivers in a separate
directory. I do all of my development in folders of a tree called
“\dev”, for “development”, but the placement is up to you.

The symbols are located only in the objxxx_yyy_zzz\i386 directory.
There’s no point in adding the others. Further, I have found it to be a
mistake to embed “obhchk” or “objfre” in my symbol path. At some point,
you will want to switch back and forth, and it’s a pain to remember to
change the symbol path every time. Plus, you cannot rebuild your driver
while WinDbg has your symbol file open. Instead, create a separate
folder to hold your “current” binary and symbols, and copy them there
when you copy the .sys to your target system.

  1. start my filter driver (the one I need to debug) on the target
    system - I started it with the filtject dll that Walter Oney supplies
    in his companion documentation to his book “Programming the Microsoft
    Windows Driver Model” The only evidence I have that the driver has
    loaded is the registry

HKEY_LOCAL_MACHINE-SYSTEM-CurrentControlSet-Enum-ACPI-PNP0401-4&F29DB88&
0-UpperFilters

= ppfilter, which is the name of my filter driver.

That doesn’t say the driver is loaded. That only says the driver is
partially configured. Don Burn has given you the rest of this story.

However, lm (list modules command) on the debugger of the host
computer does not list ppfilter as a module (should it??) AND

I am having problems setting a breakpoint in the driver - I can load
the source file, but when I try to set a breakpoint (by clicking on
the hand icon while the cursor is on the line where I want the break)
I get this message:

Symbol information for the current line could not be located in the
currently loaded symbols.

I have tried numerous times to reload the symbols, and ultimately, I
set the !sym noisy ‘flag’ to get the following output which is just a
snippet of what actually comes out. I’m afraid this means nothing to
me - hopefully someone out there will understand what it is trying to
tell me.

DBGHELP: C:\Program Files\Debugging Tools for Windows\i81xdnt5.dll -
file not found

DBGHELP: invalid path:
SRV*c:\win_xp_symbols*http://msdl.microsoft.com/download/symbols

Did you create a directory called c:\win_xp_symbols on the machine
running windbg? It doesn’t create one for you. Assuming that folder
exists, that path looks fine. Exactly which version of windbg are you
using?

And just to round out the information, my driver is loaded from Drive
C of the target machine, my symbols are loaded from Drive C of my host

machine, is this a possible problem, should the driver by on a shared
network drive??

No, this is fine.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


You are currently subscribed to windbg as: xxxxx@sensorswitch.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Stacy Meszaros wrote:

My goal, which may have changed by the way to use USB port, is to simply
blow the fuse on a JTAG interface via the parallel port (or now USB)

While I may not need to continue persuing this, I am rather stubborn and
would (for my own sanity) like to resolve this. I know that there are
many devices out there that utilize the parallel port in many ways, so I
feel that there has to be a way to do this and that I have just missed
something probably quite obvious to someone else. How I long for that
simple out/in function/instruction of years gone by!!

Exactly, and for your purposes, that’s not an unreasonable goal.
Indeed, the way I would solve your problem (and have in the past) is to
use one of the drivers like giveio or dlportio that simply allow you to
do standard port I/O to selected ports from a ring 3 application.
Purists will claim that doing so will interfere with parport.sys, but
that’s just silly. Parport.sys does nothing until asked. If there is
no driver for whatever device is on your parallel port, parport.sys
won’t touch the port after it initializes itself.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

There is one thing I didn’t mention - my employer would like this whole
driver and application to be seem less for the user, ie: the user
shouldn’t be aware that a driver is being loaded onto their system.
Would either giveio or dlportio provide such anonymity?

One, other thing, from your response as to how you would handle this
problem (and have) do I assume that my other chosen paths will not work
or will be too much work for stated the goal. I am very curious about
your answer because I have seen differences in the advice given on this
users group. Some people say - oh just use this driver or that dll,
some say, you must write a driver, some say, use the parport.sys driver
as it is already there.

Thanks,
Stacy

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Tim Roberts
Sent: Wednesday, October 05, 2005 2:34 PM
To: Kernel Debugging Interest List
Subject: Re: [windbg] Loading user symbols and setting breakpoints

Stacy Meszaros wrote:

My goal, which may have changed by the way to use USB port, is to
simply
blow the fuse on a JTAG interface via the parallel port (or now USB)

While I may not need to continue persuing this, I am rather stubborn
and
would (for my own sanity) like to resolve this. I know that there are
many devices out there that utilize the parallel port in many ways, so
I
feel that there has to be a way to do this and that I have just missed
something probably quite obvious to someone else. How I long for that
simple out/in function/instruction of years gone by!!

Exactly, and for your purposes, that’s not an unreasonable goal.
Indeed, the way I would solve your problem (and have in the past) is to
use one of the drivers like giveio or dlportio that simply allow you to
do standard port I/O to selected ports from a ring 3 application.
Purists will claim that doing so will interfere with parport.sys, but
that’s just silly. Parport.sys does nothing until asked. If there is
no driver for whatever device is on your parallel port, parport.sys
won’t touch the port after it initializes itself.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.


You are currently subscribed to windbg as: xxxxx@sensorswitch.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Ok, it looks like there are two issues here. First, getting the driver
properly installed. Second, verifying that the driver is installed and
being able to manipulate it under the debugger.

To get your driver properly installed, you’ll need to write an INF file, or
do what everyone usually does and mangle an existing one. Try starting with
the INF file from the parallel-port driver you started with. Since it
sounds like your driver is a filter driver layered on an existing driver,
you’ll need to add entries for your “ppfilter” driver to the existing INF
file.

First, add a section that describes the device service. This may sound a
bit strange, but this is a hold-over from the NT3.x / NT4.x driver model –
every driver has an entry in the Service Control Manager’s database. The
command-line app sc.exe is a (crude) front-end to the SCM. The SCM contains
entries that describe both user-mode services (such as Task Scheduler, SQL
Server, etc.) as well as device drivers. To see an example of an existing
device driver’s entry, run “sc qc tcpip” (qc = query configuration). Be
careful with using sc to modify the configuration of services, because you
can quite easily hose a machine by disabling or confusing an essential
driver or service.

So, in your INF file, you need to add an entry that describes this service.
Since you’re modifying an existing driver’s INF file, there should already
be one there to serve as a template. It should be something like this:

[ppfilter_Service]
DisplayName=Whatever You Want Here
ServiceType=1 ; 1=SERVICE_KERNEL_DRIVER
StartType=3 ; 3=SERVICE_DEMAND_START
ErrorControl=1 ; 1=SERVICE_ERROR_NORMAL
ServiceBinary=%12%\ppfilter.sys

Next, you’ll need to modify the device installation section, so that it does
create this service entry when the device is installed. Find the existing
AddService=… entry, and add the name of the above section. Something
like:

[… mydeviceentry …]
AddService=fdo_service_section_name, ppfilter_Service

“fdo_service_section_name” is just a placeholder for whatever is already
there. That section needs to be preserved.

Next, add ppfilter.sys to the [SourceDisksFiles] section, and to the
“CopyFiles” section. The existing sections should serve as templates.

Next, you’ll need to add a registry entry that identifies your filter as an
upper-layer filter. Look for an AddReg section, and add a line like this:

[… blah blah .AddReg]
HKR,“UpperFilters”,0x10000,“ppfilter”

This installs a registry entry that PNP uses to build the list of upper
filters. Next, use Device Manager and re-install the drivers for your
serial port device. Using Device Manager, select device properties, go to
Driver tab, click “Update Driver…”. Now you’ll have to dodge all manner
of dialogs and refuse all sorts of attempts to find the right driver for
you. Choose no to searching the web for drivers, choose “install from a
specific location”, choose “don’t search, i’ll choose”, click “Have Disk”,
browse to the directory containing your INF file, and choose your driver.

You can also bypass the GUI and use a command-line tool from the DDK. This
can be a big help during development, to avoid the long series of GUI
prompts. The utility is in WINDDK\2600\src\setup\devcon. Build the
utility, and use the “update” command. You’ll need to provide the hardware
ID of the device to update, and the path to your INF file. You can find the
hardware ID by going to the device property page, clicking Details, and
choosing “Hardware IDs” from the drop-down. Be advised that this will
update the drivers for ALL devices whose hardware ID matches, rather than
just one device!

Device Manager *should* copy your ppfilter.sys to
%systemroot%\system32\drivers\ppfilter.sys, and should create a service
definition. You can verify this by using “sc qc ppfilter” to check that the
device driver entry has been created in the SCM. You can also use “sc query
ppfilter” to see the current status of the driver (as opposed to its
configuration) – this will tell you whether PNP+kernel has loaded your
driver or not. Example outputs:

[D:] sc qc serial
[SC] GetServiceConfig SUCCESS

SERVICE_NAME: serial
TYPE : 1 KERNEL_DRIVER
START_TYPE : 1 SYSTEM_START
ERROR_CONTROL : 0 IGNORE
BINARY_PATH_NAME : system32\DRIVERS\serial.sys
LOAD_ORDER_GROUP : Extended base
TAG : 1
DISPLAY_NAME : Serial port driver
DEPENDENCIES :
SERVICE_START_NAME :

[D:] sc query serial

SERVICE_NAME: serial
TYPE : 1 KERNEL_DRIVER
STATE : 4 RUNNING
(STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN)
WIN32_EXIT_CODE : 0 (0x0)
SERVICE_EXIT_CODE : 0 (0x0)
CHECKPOINT : 0x0
WAIT_HINT : 0x0

If you can’t get your system to this point, where you can verify that the
driver entry has been created and the state is RUNNING, then you know that
your driver is not being loaded by the OS.

INF files are maddening. They are poorly documented, and you don’t get much
diagnostic output from the apps that use them. One of the places you can
look, though, is at the file %systemroot%\setupapi.log. The SetupDi*
functions write to this file, and these are what Device Manager uses to
install device drivers. The Windows DDK provides some info on interpreting
this file, too. See:

*
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh/
install/troubleshoot_836ef6f8-9331-4228-8b49-65484adef442.xml.asp -
Interpreting setupapi.log
*
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh/
install/troubleshoot_9cef0df9-240c-4d89-b696-8b404098ba83.xml.asp - Using
SetupAPI logging
*
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/install/hh/
install/troubleshoot_66a07114-953e-49aa-bebf-f9b4ca60a6dd.xml.asp - How to
control how much detail is written to this log file

So, ok, let’s assume that the driver is properly installed. The next thing
to do is to verify this using KD/WINDBG. First, break in and do this:

bu ppfilter!DriverEntry

“bu” sets up an “unresolved” breakpoint, and is very useful. The debugger
will attempt to resolve all unresolved breakpoints, every time a driver is
loaded/unloaded. Now, start your device (enable it in the Device Manager,
or reboot your debug target with the “.reboot” command). The breakpoint
should fire.

Also, yes, “lm” or “lm m ppfilter” should definitely list your device
driver. If your driver is not listed in its output, then your driver is
definitely not loaded.

Once you’ve gotten to that point, you can deal with whether or not symbols
are properly loading. But verifying that the driver really is installed
should be done before dealing with symbols, breakpoints, etc.

If you get stuck on any of these steps, please send a description to the
list, and I’ll try to help.

– arlie


From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Stacy Meszaros
Sent: Wednesday, October 05, 2005 11:58 AM
To: Kernel Debugging Interest List
Subject: [windbg] Loading user symbols and setting breakpoints

First, let me state that I am new to WinDbg. What I have accomplished so
far is to:

1.Create a parallel port filter driver and build it with the DDK checked
build environment.

  1. Establish a serial link between my host and target computers (both
    running Windows XP (free not checked) )

  2. set the symbol file path for Windows XP from the symbol server and my
    driver - here is the path

SRV*c:\win_xp_symbols*http://msdl.microsoft.com/download/symbols;

C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386;

C:\WINDDK\3790.1830\src\wdm\par_io;

C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86

  1. start my filter driver (the one I need to debug) on the target system - I
    started it with the filtject dll that Walter Oney supplies in his companion
    documentation to his book “Programming the Microsoft Windows Driver Model”
    The only evidence I have that the driver has loaded is the registry
    HKEY_LOCAL_MACHINE-SYSTEM-CurrentControlSet-Enum-ACPI-PNP0401-4&F29DB88&0-Up
    perFilters = ppfilter, which is the name of my filter driver.

However, lm (list modules command) on the debugger of the host computer does
not list ppfilter as a module (should it??) AND

I am having problems setting a breakpoint in the driver - I can load the
source file, but when I try to set a breakpoint (by clicking on the hand
icon while the cursor is on the line where I want the break) I get this
message:

Symbol information for the current line could not be located in the
currently loaded symbols.

I have tried numerous times to reload the symbols, and ultimately, I set the
!sym noisy ‘flag’ to get the following output which is just a snippet of
what actually comes out. I’m afraid this means nothing to me - hopefully
someone out there will understand what it is trying to tell me.

DBGHELP: C:\Program Files\Debugging Tools for Windows\i81xdnt5.dll - file
not found

DBGHELP: invalid path:
SRV*c:\win_xp_symbols*http://msdl.microsoft.com/download/symbols

DBGHELP: i81xdnt5.dll not found in
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386

DBGHELP: i81xdnt5.dll not found in C:\WINDDK\3790.1830\src\wdm\par_io

DBGHELP: i81xdnt5.dll not found in
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86

DBGENG: \SystemRoot\System32\i81xdnt5.dll - Image mapping disallowed by
non-local path.

DBGHELP: unrecognized OMF sig: b00 *** WARNING: Unable to verify timestamp
for i81xdnt5.dll

*** ERROR: Module load completed but symbols could not be loaded for
i81xdnt5.dll

DBGHELP: i81xdnt5 - no symbols loaded

.

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386\NAVENG.pdb -
file not found

DBGHELP:
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386\symbols\sys\NAVENG.pd
b - file not found

DBGHELP:
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\i386\sys\NAVENG.pdb - file
not found

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\NAVENG.pdb - file not found

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\symbols\sys\NAVENG.pdb - file
not found

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\sys\NAVENG.pdb - file not found

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\NAVENG.pdb - file
not found

DBGHELP:
C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\symbols\sys\NAVENG.pdb -
file not found

DBGHELP: C:\WINDDK\3790.1830\src\wdm\par_io\objchk_wxp_x86\sys\NAVENG.pdb -
file not found

DBGHELP: C:\build\NAVENG.pdb - file not found

*** ERROR: Module load completed but symbols could not be loaded for
naveng.sys

.

Same kinds of messages for SYMREDRV.SYS, SYMTDI.SYS, SYMEVENT.SYS ETC ETC

And just to round out the information, my driver is loaded from Drive C of
the target machine, my symbols are loaded from Drive C of my host machine,
is this a possible problem, should the driver by on a shared network drive??

Thanks so much,

Stacy


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

Stacy Meszaros wrote:

There is one thing I didn’t mention - my employer would like this whole
driver and application to be seem less for the user, ie: the user
shouldn’t be aware that a driver is being loaded onto their system.
Would either giveio or dlportio provide such anonymity?

Both of those are old-style drivers that can be installed with the
Service Control Manager APIs. As long as the user has administrator
privileges, there would be nothing visible to the user. If they don’t
have administrator privileges, then action is required, and that is as
it should be. No app should be allowed to touch I/O directly without
administrator involvement.

One, other thing, from your response as to how you would handle this
problem (and have) do I assume that my other chosen paths will not work
or will be too much work for stated the goal. I am very curious about
your answer because I have seen differences in the advice given on this
users group. Some people say - oh just use this driver or that dll,
some say, you must write a driver, some say, use the parport.sys driver
as it is already there.

I don’t think the filter driver idea will ever be satisfactory. Filter
drivers are intended to get involved when you are talking to a specific
device. In your case, there is no device. No one is talking to
parport.sys. The model just isn’t right.

Talking directly to the parallel port driver SHOULD work.
Theoretically, that’s the right way to do it. However, I have never
taken the time myself to dig through the docs and examples to figure out
exactly how to speak ECP through the normal system APIs.

Purists would probably have you write a kernel driver to sit on top of
parport.sys. But since this is something with a limited life that will
be used in a development environment, I don’t see any problem
recommending the dlportio/giveio option. That is the way I’ve done it.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

> Purists would probably have you write a kernel driver

to sit on top of parport.sys. But since this is something
with a limited life that will be used in a development
environment, I don’t see any problem recommending the
dlportio/giveio option. That is the way I’ve done it.

If you do this, don’t forget to disable the “real” device driver, or
hilarity may ensue.

– arlie

Arlie Davis wrote:

>Purists would probably have you write a kernel driver
>to sit on top of parport.sys. But since this is something
>with a limited life that will be used in a development
>environment, I don’t see any problem recommending the
>dlportio/giveio option. That is the way I’ve done it.
>
>

If you do this, don’t forget to disable the “real” device driver, or
hilarity may ensue.

As I said in my previous reply, unless the device hooked up to the
parallel port has a recognized PnP signature and a known driver,
parport.sys will never touch it after it has been initialized. Thus,
“hilarity” is not a real concern.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.