Sign in to follow this  

GDB troubles

This topic is 3556 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I use the GDB debugger in combination with the Code::Blocks IDE and everytime I want to debug in a constructor, it can't see any of my watches or local variables. In regular functions everything works perfectly. Does anybody have the same problem or know how to fix it? I'm using gdb 6.7.1 Thanx in advance for any help, Jeroen

Share this post


Link to post
Share on other sites
It isn't a bug, but a "feature" of the 3.4 series which makes it impossible for the debugger to correctly resolve the constructor. Use the 4.2.x version, and you will be good.

I'm using MinGW gcc 4.2.1 / gdb 6.7.50 / Code::Blocks now, and setting breakpoints in constructors works just fine. It is also worth using the 4.2 branch for the truly awesome optimisation capabilities (something that isn't so great with the 3.4 branch).
Note that you will have to adjust your compiler settings ("toolchain executables") when switching to gcc 4.2, as the programs have a -dw2 or -sjlj postfix (depending on which one you choose).

Share this post


Link to post
Share on other sites

This topic is 3556 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this