Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Contributions to C::B => Topic started by: p2rkw on February 22, 2012, 08:08:51 pm

Title: gdb and c++11 lambdas
Post by: p2rkw 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
Title: Re: gdb and c++11 lambdas
Post by: oBFusCATed 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.
Title: Re: gdb and c++11 lambdas
Post by: Jenna 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"
Title: Re: gdb and c++11 lambdas
Post by: oBFusCATed 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:)
Title: Re: gdb and c++11 lambdas
Post by: p2rkw 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.