In gdb I can simply list func
to see the definition of func
,
and the lines increments each time.But in windbg I tried lsa开发者_开发问答 func
,
it sometimes works,but sometimes not.And even when it's working,the line doesn't increment each time I press return.
How do you check code with windbg(assume debug symbols are loaded)?
http://msdn.microsoft.com/en-gb/library/ff552114.aspx
Make sure that .lines is toggled on. You can then use l+s to display source each time you step with the debugger. You can then step through the code and source lines will be printed as you step.
http://msdn.microsoft.com/en-us/library/ff552107(v=VS.85).aspx
If you want to view the lines wihtout actuall stepping the program do lsa func to start viewing the function this will also set the current line. You can continue viewing lines by doing lsa by itself.
精彩评论