How to debug using WinDbg??

Hello,

I am new to WinDbg. And I am facing some problem in debuging my driver on NT
system using WinDbg.

  1. Created a driver, installed it on target system with demand start.

  2. Enabled debugging on target system by modifying boot.ini.

  3. Checked the COM port connection with HyperTerminal.

  4. Installed symbol files on host computers. Also set proper enviornments.

  5. Now, I launched WinDbg, Ctrl+K, gave path to symbol file, image file and
    source code.

Here, I am stuck. I really want to take over the control when target comes to
DriverEntry. I am starting my driver from Device applet at target computer.
What should I do now?Hello,

I am new to WinDbg. And I am facing some problem in debuging my driver on NT
system using WinDbg.

  1. Created a driver, installed it on target system with demand start.

  2. Enabled debugging on target system by modifying boot.ini.

  3. Checked the COM port connection with HyperTerminal.

  4. Installed symbol files on host computers. Also set proper enviornments.

  5. Now, I launched WinDbg, Ctrl+K, gave path to symbol file, image file and
    source code.

Here, I am stuck. I really want the control to come at DriverEntry when I
start my driver from Device applet at target computer.

Do I need to install WinDbg on target system also or what?

Or is there any command, which will invoke driver on target machine from host?

Please advice…

Thanks,
Giri


This e-mail has been sent to you courtesy of OperaMail, as a free service from
Opera Software, makers of the award-winning Web Browser, Opera. Visit us at
http://www.opera.com/ or our portal at: http://www.myopera.com/ Your free e-mail
account is waiting at: http://www.operamail.com/


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

For starters, ensure you can talk to the target system: Do control-break in
the command window. You should interrupt the target. If that happens, hit
F5 to let the system proceed as usual.

With connectivity established, I would add this to DriverEntry (thanks to
Mark Roddy’s suggestion):

_try
{
DbgBreakPoint();
}
_except(EXCEPTION_EXECUTE_HANDLER)
{
}

This will cause a debug breakpoint, and if your debugger is attached, you
should get control. In fact, if your symbols and other paths are correct,
you’ll be stopped in the source window.

James Antognini
IBM Research

Internet address – antognini@us.ibm.com
Notes address – James Antognini/Watson/xxxxx@IBMUS

Phone – external: 914-784-7258; tieline: 863-7258


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Or even simpler, insert KdBreakPoint() somewhere in DriverEntry.

-----Original Message-----
From: James Antognini [mailto:antognini@us.ibm.com]
Sent: Monday, April 30, 2001 11:35 PM
To: Kernel Debugging Interest List
Subject: [windbg] Re: How to debug using WinDbg??

For starters, ensure you can talk to the target system: Do control-break in
the command window. You should interrupt the target. If that happens, hit
F5 to let the system proceed as usual.

With connectivity established, I would add this to DriverEntry (thanks to
Mark Roddy’s suggestion):

_try
{
DbgBreakPoint();
}
_except(EXCEPTION_EXECUTE_HANDLER)
{
}

This will cause a debug breakpoint, and if your debugger is attached, you
should get control. In fact, if your symbols and other paths are correct,
you’ll be stopped in the source window.

James Antognini
IBM Research

Internet address – antognini@us.ibm.com
Notes address – James Antognini/Watson/xxxxx@IBMUS

Phone – external: 914-784-7258; tieline: 863-7258


You are currently subscribed to windbg as: xxxxx@nsisw.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Girish,

Well you did all that, but did you change the boot.ini file to add one of
the debugger switches? Any one of these switches will kick the target into
debug. You can tell by looking at the boot menu and seeing [DEBUG ENABLED]
next to the system you want to boot. Well you did all that, but did you
change the boot.ini file to add one of the debugger switches? Any one of
these switches will kick the target into debug. You can tell by looking at
the boot menu and seeing [DEBUG ENABLED] next to the system you want to
boot.

Gary

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Girish Desai
Sent: Monday, April 30, 2001 8:41 PM
To: Kernel Debugging Interest List
Subject: [windbg] How to debug using WinDbg??

Hello,

I am new to WinDbg. And I am facing some problem in debugging my driver on
NT
system using WinDbg.

  1. Created a driver, installed it on target system with demand start.

  2. Enabled debugging on target system by modifying boot.ini.

  3. Checked the COM port connection with HyperTerminal.

  4. Installed symbol files on host computers. Also set proper environments.

  5. Now, I launched WinDbg, Ctrl+K, gave path to symbol file, image file and
    source code.

Here, I am stuck. I really want to take over the control when target comes
to
DriverEntry. I am starting my driver from Device applet at target computer.
What should I do now? Hello,

I am new to WinDbg. And I am facing some problem in debugging my driver on
NT
system using WinDbg.

  1. Created a driver, installed it on target system with demand start.

  2. Enabled debugging on target system by modifying boot.ini.

  3. Checked the COM port connection with HyperTerminal.

  4. Installed symbol files on host computers. Also set proper environments.

  5. Now, I launched WinDbg, Ctrl+K, gave path to symbol file, image file and
    source code.

Here, I am stuck. I really want the control to come at DriverEntry when I
start my driver from Device applet at target computer.

Do I need to install WinDbg on target system also or what?

Or is there any command, which will invoke driver on target machine from
host?

Please advice…

Thanks,
Giri


This e-mail has been sent to you courtesy of OperaMail, as a free
service from
Opera Software, makers of the award-winning Web Browser, Opera. Visit us
at
http://www.opera.com/ or our portal at: http://www.myopera.com/ Your free
e-mail
account is waiting at: http://www.operamail.com/


You are currently subscribed to windbg as: xxxxx@broadstor.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com

Or just type

bp !DriverEntry

in the debugger

-----Original Message-----
From: Jerry Kelley [mailto:xxxxx@NSISW.COM]
Sent: Tuesday, May 01, 2001 6:49 AM
To: Kernel Debugging Interest List
Subject: [windbg] Re: How to debug using WinDbg??

Or even simpler, insert KdBreakPoint() somewhere in DriverEntry.

-----Original Message-----
From: James Antognini [mailto:antognini@us.ibm.com]
Sent: Monday, April 30, 2001 11:35 PM
To: Kernel Debugging Interest List
Subject: [windbg] Re: How to debug using WinDbg??

For starters, ensure you can talk to the target system: Do control-break
in
the command window. You should interrupt the target. If that happens,
hit
F5 to let the system proceed as usual.

With connectivity established, I would add this to DriverEntry (thanks
to
Mark Roddy’s suggestion):

_try
{
DbgBreakPoint();
}
_except(EXCEPTION_EXECUTE_HANDLER)
{
}

This will cause a debug breakpoint, and if your debugger is attached,
you
should get control. In fact, if your symbols and other paths are
correct,
you’ll be stopped in the source window.

James Antognini
IBM Research

Internet address – antognini@us.ibm.com
Notes address – James Antognini/Watson/xxxxx@IBMUS

Phone – external: 914-784-7258; tieline: 863-7258


You are currently subscribed to windbg as: xxxxx@nsisw.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: xxxxx@microsoft.com
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to windbg as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-windbg-$subst(‘Recip.MemberIDChar’)@lists.osr.com