Code::Blocks Forums

User forums => Help => Topic started by: ysern on August 23, 2013, 11:13:18 pm

Title: Debugger freez on watch content of class
Post by: ysern on August 23, 2013, 11:13:18 pm
Hello,

the debugger in C::B doesn't not respond after i try to watch the content of any class. These classes can be even not so complicated. For example AxisAlignedBox type from Ogre3D. The problem is all the time reproducible. I tried "set print elements 200", didn't fix that.

The version of C::B is 12.11,
                       gdb: 7.4.1+dfsg-0.1

My system based on AMD x64 CPU
Title: Re: Debugger freez on watch content of class
Post by: oBFusCATed on August 25, 2013, 08:47:01 pm
Do you have a minimal code sample that reproduces the problem?
Does your class have a static member of the same class type?
Title: Re: Debugger freez on watch content of class
Post by: ysern on August 25, 2013, 11:55:37 pm
Hi oBFusCATed, thank you that you try to help me.

In my project i use OgreKit library.

There are a lot of classes that cause the debugger freeze problem. For example this quite simple  one: http://code.google.com/p/gamekit/source/browse/branches/OgreKit/OgreLite/OgreMain/include/OgreAxisAlignedBox.h?r=151 (http://code.google.com/p/gamekit/source/browse/branches/OgreKit/OgreLite/OgreMain/include/OgreAxisAlignedBox.h?r=151). It has static members of the same class type. Is it a problem for debugger?
Title: Re: Debugger freez on watch content of class
Post by: oBFusCATed on August 26, 2013, 10:06:06 am
Is it a problem for debugger?
Yes, it is, the debugger enters infinite recursion.
Put this line in the initial commands in the debugger settings and it will work fine.
Code
set print static-members off
Title: Re: Debugger freez on watch content of class
Post by: ysern on August 26, 2013, 11:16:28 am
Put this line in the initial commands in the debugger settings and it will work fine.
Code
set print static-members off

Now it works. Very thanks oBFusCATed!