EDIT: Don't read this wall of text, read my next post. The solution is so simple... Once you know it.
So I disabled the watch script. GDB says it already registered this printer, so this should be OK. The TDM GCC comes with full python support right out of the box as it seems.
Didn't add the wxwidgets printer yet, but I didn't want to bring too much complexity to my problem if STL still doesn't work right.
I also tried adding my own pp.gdb to the startup line for gdb- but the printer for STL is already registered.
The type is recognized now, but the data fields are not.
Well, the good thing is that I've never ever came so far as now. That watch script was the big pitfall, now I'm not so far away of having working. I just need to figure out how to access the elements of a vector.
Also, the "*this" hint was one big step forward.
And a really minimum example that shows it can be found in another thread:
http://forums.codeblocks.org/index.php/topic,21998.15.htmlThat isn't my problem though since I'm using the python-enabled TDM GCC already setup for GCC.
However, they provide a true minimum sample.
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<double> test;
test.push_back( 22.44 );
test.push_back( 1.3795933261199322e-306 );
cout << "Hello world!" << endl;
return 0;
}
Which gives me the output of the png attached. I had expected to read at least the size of the vector if the content cannot be parsed because it is some custom class. At least that is how other IDE's (read: GDB implementations) handle it.
The gdb output for this minimum example is:
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Users\Adams\Documents\CodeBlocks\consoletestproject\
Adding source dir: C:\Users\Adams\Documents\CodeBlocks\consoletestproject\
Adding file: C:\Users\Adams\Documents\CodeBlocks\consoletestproject\bin\Debug\consoletestproject.exe
Changing directory to: C:/Users/Adams/Documents/CodeBlocks/consoletestproject/.
Set variable: PATH=.;C:\TDM-GCC-32\bin;C:\TDM-GCC-32;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Skype\Phone;C:\Program Files\TortoiseSVN\bin
[debug]Command-line: C:\TDM-GCC-32\bin\gdb32.exe -nx -fullname -quiet -args C:/Users/Adams/Documents/CodeBlocks/consoletestproject/bin/Debug/consoletestproject.exe
[debug]Working dir : C:\Users\Adams\Documents\CodeBlocks\consoletestproject
Starting debugger: C:\TDM-GCC-32\bin\gdb32.exe -nx -fullname -quiet -args C:/Users/Adams/Documents/CodeBlocks/consoletestproject/bin/Debug/consoletestproject.exe
done
[debug]> set prompt >>>>>>cb_gdb:
[debug]Skip initializing the scripting!
Setting breakpoints
[debug]Reading symbols from C:/Users/Adams/Documents/CodeBlocks/consoletestproject/bin/Debug/consoletestproject.exe...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (GDB) 7.9.1
[debug]Copyright (C) 2015 Free Software Foundation, Inc.
[debug]License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
[debug]This is free software: you are free to change and redistribute it.
[debug]There is NO WARRANTY, to the extent permitted by law. Type "show copying"
[debug]and "show warranty" for details.
[debug]This GDB was configured as "mingw32".
[debug]Type "show configuration" for configuration details.
[debug]For bug reporting instructions, please see:
[debug]<http://www.gnu.org/software/gdb/bugs/>.
[debug]Find the GDB manual and other documentation resources online at:
[debug]<http://www.gnu.org/software/gdb/documentation/>.
[debug]For help, type "help".
[debug]Type "apropos word" to search for commands related to "word".
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (GDB) 7.9.1
[debug]>>>>>>cb_gdb:
[debug]> set width 0
[debug]>>>>>>cb_gdb:
[debug]> set height 0
[debug]>>>>>>cb_gdb:
[debug]> set breakpoint pending on
[debug]>>>>>>cb_gdb:
[debug]> set print asm-demangle on
[debug]>>>>>>cb_gdb:
[debug]> set unwindonsignal on
[debug]>>>>>>cb_gdb:
[debug]> set print elements 0
[debug]>>>>>>cb_gdb:
[debug]> set new-console on
[debug]>>>>>>cb_gdb:
[debug]> set disassembly-flavor att
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory C:/Users/Adams/Documents/CodeBlocks/consoletestproject/
[debug]Source directories searched: C:/Users/Adams/Documents/CodeBlocks/consoletestproject;$cdir;$cwd
[debug]>>>>>>cb_gdb:
[debug]> break "C:/Users/Adams/Documents/CodeBlocks/consoletestproject/main.cpp:15"
[debug]Breakpoint 2 at 0x40140a: file C:\Users\Adams\Documents\CodeBlocks\consoletestproject\main.cpp, line 15.
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Starting program: C:\Users\Adams\Documents\CodeBlocks\consoletestproject\bin\Debug\consoletestproject.exe
Child process PID: 6408
[debug][New Thread 6408.0x1124]
[debug]Breakpoint 2, main () at C:\Users\Adams\Documents\CodeBlocks\consoletestproject\main.cpp:15
[debug]C:\Users\Adams\Documents\CodeBlocks\consoletestproject\main.cpp:15:248:beg:0x40140a
[debug]>>>>>>cb_gdb:
At C:\Users\Adams\Documents\CodeBlocks\consoletestproject\main.cpp:15
[debug]> info locals
[debug]test = {<std::_Vector_base<double, std::allocator<double> >> = {_M_impl = {<std::allocator<double>> = {<__gnu_cxx::new_allocator<double>> = {<No data fields>}, <No data fields>}, _M_start = 0x711650, _M_finish = 0x711660, _M_end_of_storage = 0x711660}}, <No data fields>}
[debug]>>>>>>cb_gdb:
[debug]> info args
[debug]No arguments.
[debug]>>>>>>cb_gdb:
[debug]> whatis foldingvector
[debug]No symbol "foldingvector" in current context.
[debug]>>>>>>cb_gdb:
[debug]> bt 30
[debug]#0 main () at C:\Users\Adams\Documents\CodeBlocks\consoletestproject\main.cpp:15
[debug]>>>>>>cb_gdb:
You should however ignore that foldingvector entry, this was still written in my watchlist.
However, what is interesting is that in the other thread, someone commanded "whatis test[0]" but this gives me the following log:
[debug]> whatis test[0]
[debug]Could not find operator[].
[debug]>>>>>>cb_gdb:
Could not find operator[].
And "output test" gives:
[debug]> output test
[debug]{<std::_Vector_base<double, std::allocator<double> >> = {_M_impl = {<std::allocator<double>> = {<__gnu_cxx::new_allocator<double>> = {<No data fields>}, <No data fields>}, _M_start = 0x711650, _M_finish = 0x711660, _M_end_of_storage = 0x711660}}, <No data fields>}>>>>>>cb_gdb:
{<std::_Vector_base<double, std::allocator<double> >> = {_M_impl = {<std::allocator<double>> = {<__gnu_cxx::new_allocator<double>> = {<No data fields>}, <No data fields>}, _M_start = 0x711650, _M_finish = 0x711660, _M_end_of_storage = 0x711660}}, <No data fields>}
I think this is the root of the problem..?
To be honest I am lost completely why this seems to work on some systems and on others, it doesn't.