Setting break point using source code line number in WinDBG

隐身守侯 提交于 2019-12-06 18:56:17

问题


I am aware of setting breakpoint base on function name in WinDBG using bp, bm commands is there a way to set break point break on source code line number

say

 <some command> 20

means it should set breakpoint at line 20

Thanks in advance


回答1:


bp `source.c:12`

Optionally, you can load the source file in WinDBG, set the cursor to the line you want to set a breakpoint to, and hit F9.

Also try .hh bp for more info




回答2:


Here is the syntax for setting bp on line number

bp (@@masm(`main.c:8+`))

For the above to work .lines should be enabled

HTH




回答3:


Here's the syntax:

bu `module_name!file.cpp:206`



来源:https://stackoverflow.com/questions/3952782/setting-break-point-using-source-code-line-number-in-windbg

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!