I\'ve followed the instructions on the GDB wiki to install the python pretty-printers for viewing STL containers. My ~/.gdbinit
now looks like this:
<
I think you are using a non-GNU STL library, or possible a very old GCC libstdc++
. The type of a normal STL string on my compiler is: std::basic_string
. Note that this is not std::basic_string
.
The Python code has this in it:
reptype = gdb.lookup_type (str (realtype) + '::_Rep').pointer ()
This look up a nested type ::Rep
of whatever the base string type actually is. The error message inidicates that the string class of whatever strange library you're using doesn't actually have a ::Rep
nested type.