Can GDB debug C++ lambdas?

后端 未结 3 453
小鲜肉
小鲜肉 2021-02-07 02:48

I use C++ 11 features actively. I have program created in Visual Studio 2013 that relies on lambdas to run multiple threads (lambda represents task, and thread receives lambda i

3条回答
  •  难免孤独
    2021-02-07 03:15

    From my experience, gdb cannot step into lambdas -- it just skips over them. Not only that, stepping into a lambda definition seems to confuse gdb and it proceeds to the end of the current function. You can, however, place a breakpoint explicitly inside a lambda, and if you hit that point, you will stop. This is obviously far from ideal.

提交回复
热议问题