Hi,
renega_666, I just read all your posts on the thread.
There are currently two method of show a std::string value under C::B.
1,
Use a python enabled gdb.
Disable the script (Uncheck the "Enable watch scripts") in the debugger setting dialog.
Adding some custom scripts to load python pretty printers when gdb started.
(I use: "source $(TARGET_COMPILER_DIR)bin\stl.gdb" for c++ stl library and "source $(TARGET_COMPILER_DIR)bin\wx.gdb" for wxWidgts library).
Note: You should have pretty printer scripts folders under your MinGw/bin folder.
2,
Use a normal gdb (whether it was python enabled or not).
Enable the script (Check the "Enable watch scripts") in the debugger setting dialog.
Do not add any custom loading python scripts.
I just test the method 1, and it works OK.
When I test method 2, the watch window shows that: Parsing GDB output failed for 'str'!
I'm using this debugger branch nighty build, and windows XP, the gdb was my personal build version: GNU gdb (GDB) 7.4.50.20120128-cvs
The related failed log:
[debug]>>>>>>cb_gdb:
[debug]> whatis str
[debug]type = String
[debug]>>>>>>cb_gdb:
[debug]> output str
[debug]{
[debug] static npos = 4294967295
[debug],
[debug] _M_dataplus = {
[debug] <std::allocator<char>> = {
[debug] <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug] members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug] _M_p = 0x3f3d5c "My string"
[debug] }
[debug]}>>>>>>cb_gdb:
[debug]> whatis foo
[debug]type = Foo
[debug]>>>>>>cb_gdb:
[debug]> output foo
[debug]{
[debug] mName = {
[debug] static npos = 4294967295,
[debug] _M_dataplus = {
[debug] <std::allocator<char>> = {
[debug] <__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
[debug] members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
[debug] _M_p = 0x3f3d2c "MyFoo"
[debug] }
[debug] },
[debug] mBar = 0
[debug]}>>>>>>cb_gdb:
So, either the new gdb has different output string than some old gdb version(like the official gdb7.3.1) Or there are some parsing errors.
To me, I suggest you use the method 1, because it is much better and powerful.