News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

watching std::list iterator class member

Started by O-san, March 29, 2009, 07:00:52 PM

Previous topic - Next topic

O-san

Hello!

I've got a problem with code completion and the watch window. I'd be very grateful if anyone could tell me how I can see class members of a list::iterator in the watch? I thought this would work:

It->mValue

But it does not. Instead I get this message in the watch result "There is no member or method named mValue". The code completion that lets you choose between the different class members in a dropdown list does not work either. There are however no compilation errors.

O-san

Found this bug description for gdb http://sourceware.org/bugzilla/show_bug.cgi?id=8722.

So it turns out that the bug is outside code::blocks scope. Their "solution" proposed works reasonably well also.
Mod: feel free to remove topic.

Jenna

Quote from: O-san on March 29, 2009, 09:16:14 PM
Mod: feel free to remove topic.

No, because it shows a solution, that can help other users too.

In short instead of trying it->mValue , you should try (*it).mValue .

It seems to be a gdb-bug with overloaded "->"-operators.