Solved

windows NT kernel driver debugging

Posted on 1997-05-16
4
526 Views
Last Modified: 2013-12-03
 I am having trouble using Windbg to debug a windows nt device driver. I  have a null modem cable installed between two computers both running the  same version of windows nt. I can use the com ports to talk between the
  two so I know the wiring is right. The host uses COM1 the target  COM2.
 
  I have enabled debugging on the target by inserting the /DEBUGPORT=COM2
  and /BAUDRATE=19200 in the boot.ini file under the correct [operating   systems] section.
 
  I start Windbg on the host system by: WinDbg -k i386 COM1 19200.
  When I select go I get the following message:
  Thread Create:  Process=0, Thread=0
  Kernel debugger waiting to connect on com1 @ 19200 baud
  >
 check the SYMBOLS path in WinDbg. It points to a directory with the following structure:

SYMBOLS
    DLL
    EXE
    SYS
The SYS directory contains the checked version of my driver.
 
 I then boot the target and the blue screen comes up saying  Kernel Debugger Using: COM2 (Port 0x2f8, Baud Rate 19200)
The screen flickers and I see the RCV and SND flash.
 
 
 I get stuck here because I never seem to get a response from the target. If I hit the ^C on the host the target will lock up. I never get any message saying the computers connected, but the ^c stops the target. The host never seems to connect!

 What am I doing wrong? Have I left
0
Comment
Question by:rgardea
  • 2
4 Comments
 

Expert Comment

by:21186
Comment Utility
I have been unable to reproduce your symptoms. The message about checking your SYMBOLS path is not normal however. Make sure that the Symbol Search Path under the menu selections "Options\User DLLs" is set to the path you have placed your drivers checked binarie. I did find that if I have this path set wrong and the target machine hits a breakpoint in a driver it cannot continue the boot process, but it will halt on a ^c. After executing a ^c try typing ".reload" in the command window to see what happens.By the way windbg sucks. The only thing it is better than is nothing, wich is your only other option.
0
 
LVL 2

Accepted Solution

by:
amartin030297 earned 100 total points
Comment Utility
Since nobody has answered you (and I don't have a technical ANSWER for you), but I have a non-free solution:

Purchase SoftIce.  www.numega.com

Its trivial to debug kernel level drivers with it.  And you can
use a serial link OR 2 video cards OR 1 video card and 1 mono monitor (which is how most people do it).

It can also trace into and outof Interrupt (WinDbg sucks at that).

  -- Aaron

0
 
LVL 3

Expert Comment

by:vinniew
Comment Utility
It would be reasonably trivial to set up a Linux partition for the COM port.  Then you could use tcpdump to get all the info you could ever want.  Reboot. switch back to windows.  done.  Linux is *much* better at getting port info.
0
 
LVL 3

Expert Comment

by:vinniew
Comment Utility
Did I say tcpdump? whoops.  redirect a tty to a file.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This article describes how to programmatically preset the "Pages per Sheet" option that's available with most printer drivers.   This setting lets you do "n-Up" printing, where two, four, or more pages are printed on each sheet of paper. If your …
What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now