Questions on Win2000 Windeg

Win2000 and WinNT4 don’t contain runwdeb.wrf file.

I need some help on Win2000 Windbg.

  1. How to load my own driver symbols? I followed the following steps to
    try to load my driver symbols:

  2. Compile my driver with Win2000 DDK to get MyDriver.sys and
    MyDriver.pdb

  3. Create “MySymbols” with “sys” subdir and copy MyDriver.pdb
    to “sys” directory on the host system

  4. Copy MyDriver.sys file to %winnt%\system32\drivers directory
    on the target system

  5. Set “Debug Symbol Search Path” in “Windows Debugger
    Options\Symbols” to “MySymbols”

When MyDriver.sys is loaded, the corresponding symbols can not be
loaded. What is wrong?

  1. How to debug driver in source level? How to set “Default Search
    Path” and “Path Mapping Pairs” (“Source” and “Mapped to”) in “Windows
    Debugger Options\Source files”? I checked Win2000 DDK document but couldn’t
    find the solution.

Thanks

James

-----Original Message-----
From: xxxxx@aol.com [mailto:xxxxx@aol.com]
Sent: Friday, February 25, 2000 12:47 AM
To: NT Developers Interest List
Subject: [ntdev] RE: 0x18 PnP IRP???

In your runwdeb.wrf file add the following:
/s:C:\SymDir\MySymFile.Sym

That’s how Win9x WDEB386 works. I believe WinDbg should require the same
semantics.

<< The major function is IRP_MJ_PNP (0x1b) and the minor function is 0x18.

So Dinker, do you know normally how to handle this function? My device is a
USB device. Currently, I don’t handle it.

Another question: How to add my own driver symbols to WinDbg in Win2000?
Right now, I have a symbols directory and a sub directory sys for my driver
and copied *.pdb (I also tried *.sys, *.sym) to the sub directory and in
WinDbg setting, I set the directory path. But when my driver is loaded,
WinDbg still can not find the symbol. Waht’s wrong?

Thanks

James >>


You are currently subscribed to ntdev as: xxxxx@asia.adaptec.com
To unsubscribe send a blank email to $subst(‘Email.Unsub’)

> -----Original Message-----

From: Zhou, James [mailto:xxxxx@asia.adaptec.com]
Sent: Sunday, February 27, 2000 11:45 PM
To: NT Developers Interest List
Subject: [ntdev] Questions on Win2000 Windeg

Win2000 and WinNT4 don’t contain runwdeb.wrf file.

I need some help on Win2000 Windbg.

  1. How to load my own driver symbols? I followed the
    following steps to
    try to load my driver symbols:

  2. Compile my driver with Win2000 DDK to get
    MyDriver.sys and
    MyDriver.pdb

  3. Create “MySymbols” with “sys” subdir and copy
    MyDriver.pdb
    to “sys” directory on the host system

No. Just copy the .sys file to the symbols directory. The pdb file will be
picked up by windbag looking in the sys file and finding the path to the pdb
file. This works fine of course if you are compiling on the same machine you
are running windbag on.

Also, you really need to install the W2K symbols on your host machine as
well.

  1. Copy MyDriver.sys file to
    %winnt%\system32\drivers directory
    on the target system
  2. Set “Debug Symbol Search Path” in “Windows Debugger
    Options\Symbols” to “MySymbols”

When MyDriver.sys is loaded, the corresponding symbols
can not be
loaded. What is wrong?

  1. How to debug driver in source level? How to set “Default Search
    Path” and “Path Mapping Pairs” (“Source” and “Mapped to”) in “Windows
    Debugger Options\Source files”? I checked Win2000 DDK
    document but couldn’t
    find the solution.

I no longer bother trying to get the GUI setup working in windbag. Starting
with RC2, windbag has developed enough defects to make it nearly unusable.
Instead I start windbag from the command line, explicitly setting all the
options that need to be set. So for example I have a windbag icon on my
desktop that has the command line:

H:NTDDK\bin\windbg.exe -k x86 com2 57600 -y “G:\Symbols”

I’ve installed the complete w2k symbols at G:\Symbols and I copy my driver
.sys files to both the G:Symbols directory (top level not in sys) and to the
target machine. I have lots of problems with windbag, but finding the
symbols is not currently one of them.

Hope this helps, sorry windbag is such a mess.

> When MyDriver.sys is loaded, the corresponding symbols can not be

loaded. What is wrong?

In NT4 on target + w2k windbg build 1999, it worked if:

  • you set the Symbols Path to some dir.
  • you place all .dbg/.pdb/.sys files of build result to this directory.
  • no “sys” subdir.
  1. How to debug driver in source level?

Impossible if windbg did not find symbols. But if symbols are found - just
open a source file by File/Open, having the debuggee loaded, & set
breakpoints there by mouse.

Max