Solved

Current line

Posted on 2006-06-20
9
323 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.

719 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