Solved

Current line

Posted on 2006-06-20
9
307 Views
Last Modified: 2010-04-15
Hi all,
 I just wonder what command help me to know the current line at which i am running debugger in windbg? Thanks.
0
Comment
Question by:valleytech
  • 3
  • 2
  • 2
9 Comments
 

Author Comment

by:valleytech
ID: 16946680
kd> l-t
Source options are e:
     2/l - List source line at prompt
     4/s - List source code at prompt
     8/o - Only show source code at prompt

====> when i type l-t, i got that notes. I dont' understand their meaning. Please help.
0
 
LVL 20

Expert Comment

by:alainbryden
ID: 16946681
just type backtrace, and it should tell you where you are in each nested method
0
 

Author Comment

by:valleytech
ID: 16946885
when i type "backtrace", i got syntax error.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 11

Expert Comment

by:dimitry
ID: 16947570
Try:
kd> u
(Unassemble next few instructions)
0
 
LVL 20

Expert Comment

by:alainbryden
ID: 16947574
I'm sorry you're using windbg I was thinking of unix dbg
0
 

Author Comment

by:valleytech
ID: 16947587
kd>u doesn't work

kd> u
nt!KeUpdateSystemTime+0x142:
805120f8 ebb4             jmp     nt!KeUpdateSystemTime+0xf8 (805120ae)
nt!KeUpdateRunTime:
805120fa a11cf0dfff       mov     eax,[ffdff01c]
805120ff 53               push    ebx
80512100 ff80c4050000     inc     dword ptr [eax+0x5c4]
80512106 8b9824010000     mov     ebx,[eax+0x124]
8051210c 8b4b44           mov     ecx,[ebx+0x44]
8051210f f7457000000200   test    dword ptr [ebp+0x70],0x20000
80512116 753e             jnz     nt!KeUpdateRunTime+0x60 (80512156)
kd> bl
 0 eu             0001 (0001) (@@masm(`hello.c:22+`))
 1 eu             0001 (0001) (@@masm(`hello.c:22+`))
 2 eu             0001 (0001) (DriverEntry)
 3 eu             0001 (0001) (DriverEntry)
 4 eu             0001 (0001) (DriverEntry)
 5 e 805120ac     0001 (0001) nt!KeUpdateSystemTime+0xf6

kd> l+t
Source options are f:
     1/t - Step/trace by source line
     2/l - List source line at prompt
     4/s - List source code at prompt
     8/o - Only show source code at prompt
kd>
Source options are f:
     1/t - Step/trace by source line
     2/l - List source line at prompt
     4/s - List source code at prompt
     8/o - Only show source code at prompt
0
 
LVL 11

Accepted Solution

by:
dimitry earned 50 total points
ID: 16948048
Host: Adi (Microsoft)
Q: How to debug source code in NTSD/KD (in a similar way as in WinDbg)?

A: The commands are ".lines" followed by "l+*". Following that, you can step directly into source code, and "ls." will show you the current source. Before that, you need to run ".srcpath" to set the path to the source.

Host: Ilyak (Microsoft)
Q: How to debug source code in NTSD/KD (in a similar way as in WinDbg

A: l+l;l+s;l+t first: Then can do lsa, ls, lsp, lsc, lsf -- read doc

0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
Summary: This tutorial covers some basics of pointer, pointer arithmetic and function pointer. What is a pointer: A pointer is a variable which holds an address. This address might be address of another variable/address of devices/address of fu…
The goal of this video is to provide viewers with basic examples to understand recursion in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.

706 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

23 Experts available now in Live!

Get 1:1 Help Now