CDB command for setting a breakpoint based on a li

2020-07-28 10:05发布

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条回答
戒情不戒烟
2楼-- · 2020-07-28 10:41

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`;

查看更多
登录 后发表回答