Solved

Current line

Posted on 2006-06-20
9
317 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops 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.

791 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