2

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.

Thomas Weller
  • 55,411
  • 20
  • 125
  • 222
Abstract type
  • 1,901
  • 2
  • 15
  • 26

1 Answers1

3

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

Abstract type
  • 1,901
  • 2
  • 15
  • 26