I have tried googling for an answer, but haven't found anything that didn't look very outdated.
What I want to do is simply to have sane debugging for C++ code, using MinGW under Windows. Almost every variable and function is inaccessible, the best I can get is the hex value of pointers.
Is there any tutorial or walk through on how to use GDB in a productive fashion for C++ code in Code::Blocks? As it is, I'm happy when I can even get to see the content of an std::string. Almost no matter what I put into the "watch" fields, I get an "Not available in current context!" or "<optimized out>". If I try to use the GDB console, it is always a bunch of "Couldn't find method std::istream::eof" this and "Cannot evaluate function -- may be inlined" that.
Of course I use -o0 -g3 -fno-inline, __attribute__ ((used, noinline)) on everything, etc. Rarely helps. (yes, I understand the difference between target and project options)
There is some talk in the wiki of squirrel scripting for making custom views of objects. However, it says (in a somewhat snarky way, I might add) that if you have to ask you ain't never gonna know, and that user scripts are planned to be implemented sometime in the future.
Other forum posts talks about using a python-enabled GDB, didn't get it.
To be honest, I've only ever used the basics of GDB, that was always enough for C code, and with Python it was never a problem. It still bothers me that we seem to be expected to program C++ with basicly no debugging support other than basic break points and prints. After having programmed dynamic languages for some years, where you generally the kind of debugging support you'd logically expect, the whole thing feels a bit retarded, because obviously you need a proper debugger much more desperately when doing the things that C++ is good for, such as bare metal coding. But googling for an answer, it really seems that people still in 2015 do C++ debugging with mere line breaks and vardumps.