CDB command for setting a breakpoint based on a line number

一个人想着一个人 提交于 2019-12-08 06:26:27

问题


Is there a set of CDB commands for setting a breakpoint based on a line number?

It seems that there is no "direct" one. Actually it seems that CDB knowledge is falling into a black hole and it's getting harder and harder to find resources on the Internet.

My CDB setup

cdb -c "l+*;.lines"

and later I add the source

lsf mySource.d

Currently I put hard-coded breakpoints with a mixin

enum brk = "debug{asm{int 3;}}";
// code
mixin(brk);

But it's not a viable solution.


回答1:


The syntax to break in source line mode, is well explained here or here, e.g:

bp `mod!source.c:12`;

And to stop on a particular line:

g `:20`;



来源:https://stackoverflow.com/questions/26775818/cdb-command-for-setting-a-breakpoint-based-on-a-line-number

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