User forums > Using Code::Blocks

watching std::list iterator class member

(1/1)

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.

--- End quote ---

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.

Navigation

[0] Message Index

Go to full version