Author Topic: gdb and c++11 lambdas  (Read 13132 times)

Offline p2rkw

  • Almost regular
  • **
  • Posts: 142
gdb and c++11 lambdas
« on: February 22, 2012, 08:08:51 pm »
Hi,
1) I'm using tdm gcc 4.6.1 and gdb 7.3. When I set breakpoint into lambda expression debugger breaks at correct line, and immediately changes context to one frame 'higher'. So i typed in gdb console 'frame 0' but code blocks again changed it immediately to frame 1. When i runned gdb from console (without C::B) everything was fine.

I can paste log if u want, but i can tell u now that gdb breaks inside lambda, then c::b calls "info locals", "info args", "bt 30" and after that "frame 1".

2) when i tryig change gdb prompt in c:b console debugger hangs.

3) where cen i find gdb initialization commands (these send from c::b), or its hardcoded in source?

Sorry for multi thread :)

PS. code::blocks build rev 7671
« Last Edit: February 22, 2012, 08:11:14 pm by p2rkw »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: gdb and c++11 lambdas
« Reply #1 on: February 22, 2012, 09:00:06 pm »
Works here, debugger's branch latest nightly build, tdm's gcc 4.5, gdb-7.3.50 or something like that.

Try the debugger's branch version and then report back if it is still broken.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7256
Re: gdb and c++11 lambdas
« Reply #2 on: February 22, 2012, 09:35:51 pm »
Works for me on trunk, if you uncheck "Settings -> Compiler and debugger... -> Debugger settings -> When stopping, auto-switch to first frame with valid source info"

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: gdb and c++11 lambdas
« Reply #3 on: February 22, 2012, 09:52:10 pm »
Works for me on trunk, if you uncheck "Settings -> Compiler and debugger... -> Debugger settings -> When stopping, auto-switch to first frame with valid source info"
As far as I remember this option was broken in trunk's version, so it is advisable to be disabled anyway:)
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline p2rkw

  • Almost regular
  • **
  • Posts: 142
Re: gdb and c++11 lambdas
« Reply #4 on: February 22, 2012, 10:11:50 pm »
@jens: I tried this method, but it didn't work.

I downloaded debugger branch and now it works very well, is even better than trunk version :)
Thanks guys.