Yeah! Sure:
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /host/James/Ubuntu/C-C++/ParseWords/
Adding source dir: /host/James/Ubuntu/C-C++/ParseWords/
Adding file: /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
Changing directory to: /host/James/Ubuntu/C-C++/ParseWords/.
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -args /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
done
Setting breakpoints
Debugger name and version: GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
At /host/James/Ubuntu/C-C++/ParseWords/main.cpp:220
Try again, but first enable the full logging in the options.
Opps, yeah, my bad, here's take two :P
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /host/James/Ubuntu/C-C++/ParseWords/
Adding source dir: /host/James/Ubuntu/C-C++/ParseWords/
Adding file: /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
Changing directory to: /host/James/Ubuntu/C-C++/ParseWords/.
[debug]LD_LIBRARY_PATH=.:
[debug]Command-line: /usr/bin/gdb -nx -fullname -quiet -args /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
[debug]Working dir : /host/James/Ubuntu/C-C++/ParseWords
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -args /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
done
[debug]> set prompt >>>>>>cb_gdb:
[debug]Skip initializing the scripting!
Setting breakpoints
[debug]Queued:[tty /dev/?]
[debug]Reading symbols from /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords...
[debug]done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
[debug]Copyright (C) 2012 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 "x86_64-linux-gnu".
[debug]For bug reporting instructions, please see:
[debug]<http://bugs.launchpad.net/gdb-linaro/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
[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 disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory /host/James/Ubuntu/C-C++/ParseWords/
[debug]>>>>>>cb_gdb:
[debug]> break "/host/James/Ubuntu/C-C++/ParseWords/main.cpp:220"
[debug]Breakpoint 2 at 0x401fcd: file /host/James/Ubuntu/C-C++/ParseWords/main.cpp, line 220.
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/?
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]/dev/?: No such file or directory.
[debug]During startup program exited with code 1.
[debug]>>>>>>cb_gdb:
I see nothing related to watches here.
Please post a log from a debug session, where a breakpoint is hit and you add a watch to a vector.
Terribly sorry, here's the stuff you were looking for:
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /host/James/Ubuntu/C-C++/ParseWords/
Adding source dir: /host/James/Ubuntu/C-C++/ParseWords/
Adding file: /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
Changing directory to: /host/James/Ubuntu/C-C++/ParseWords/.
[debug]LD_LIBRARY_PATH=.:
[debug]Command-line: /usr/bin/gdb -nx -fullname -quiet -args /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
[debug]Working dir : /host/James/Ubuntu/C-C++/ParseWords
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -args /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
done
[debug]> set prompt >>>>>>cb_gdb:
[debug]Skip initializing the scripting!
Setting breakpoints
[debug]Reading symbols from /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
[debug]Copyright (C) 2012 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 "x86_64-linux-gnu".
[debug]For bug reporting instructions, please see:
[debug]<http://bugs.launchpad.net/gdb-linaro/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
[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 disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory /host/James/Ubuntu/C-C++/ParseWords/
[debug]>>>>>>cb_gdb:
[debug]> break "/host/James/Ubuntu/C-C++/ParseWords/main.cpp:220"
[debug]Queued:[tty /dev/pts/1]
[debug]Breakpoint 2 at 0x401fcd: file /host/James/Ubuntu/C-C++/ParseWords/main.cpp, line 220.
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/1
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Breakpoint 2, ParseThesaurus (inFilename=..., inWordPackageArray=...) at /host/James/Ubuntu/C-C++/ParseWords/main.cpp:220
[debug]/host/James/Ubuntu/C-C++/ParseWords/main.cpp:220:5438:beg:0x401fcd
[debug]>>>>>>cb_gdb:
At /host/James/Ubuntu/C-C++/ParseWords/main.cpp:220
[debug]> whatis ParsedStringArray
[debug]type = std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >
[debug]>>>>>>cb_gdb:
[debug]> output ParsedStringArray
[debug]{<std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {_M_impl = {<std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<__gnu_cxx::new_allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<No data fields>}, <No data fields>}, _M_start = 0xa3daf0, _M_finish = 0xa55af0, _M_end_of_storage = 0xa5daf0}}, <No data fields>}>>>>>>cb_gdb:
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: /host/James/Ubuntu/C-C++/ParseWords/
Adding source dir: /host/James/Ubuntu/C-C++/ParseWords/
Adding file: /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
Changing directory to: /host/James/Ubuntu/C-C++/ParseWords/.
[debug]LD_LIBRARY_PATH=.:
[debug]Command-line: /usr/bin/gdb -nx -fullname -quiet -args /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
[debug]Working dir : /host/James/Ubuntu/C-C++/ParseWords
Starting debugger: /usr/bin/gdb -nx -fullname -quiet -args /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
done
[debug]> set prompt >>>>>>cb_gdb:
[debug]Skip initializing the scripting!
Setting breakpoints
[debug]Reading symbols from /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords...done.
[debug](gdb) >>>>>>cb_gdb:
[debug]> show version
[debug]GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
[debug]Copyright (C) 2012 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 "x86_64-linux-gnu".
[debug]For bug reporting instructions, please see:
[debug]<http://bugs.launchpad.net/gdb-linaro/>.
[debug]>>>>>>cb_gdb:
[debug]> set confirm off
Debugger name and version: GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2) 7.4-2012.04
[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 disassembly-flavor intel
[debug]>>>>>>cb_gdb:
[debug]> catch throw
[debug]Function "__cxa_throw" not defined.
[debug]Catchpoint 1 (throw)
[debug]>>>>>>cb_gdb:
[debug]> directory /host/James/Ubuntu/C-C++/ParseWords/
[debug]>>>>>>cb_gdb:
[debug]> break "/host/James/Ubuntu/C-C++/ParseWords/main.cpp:220"
[debug]Breakpoint 2 at 0x401fcd: file /host/James/Ubuntu/C-C++/ParseWords/main.cpp, line 220.
[debug]>>>>>>cb_gdb:
[debug]> tty /dev/pts/1
[debug]Queued:[tty /dev/pts/1]
[debug]>>>>>>cb_gdb:
[debug]> run
[debug]Breakpoint 2, ParseThesaurus (inFilename=..., inWordPackageArray=...) at /host/James/Ubuntu/C-C++/ParseWords/main.cpp:220
[debug]/host/James/Ubuntu/C-C++/ParseWords/main.cpp:220:5418:beg:0x401fcd
[debug]>>>>>>cb_gdb:
At /host/James/Ubuntu/C-C++/ParseWords/main.cpp:220
[debug]> whatis ParsedStringArray
[debug]type = std::vector<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >
[debug]>>>>>>cb_gdb:
[debug]> output ParsedStringArray
[debug]{<std::_Vector_base<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > > >> = {_M_impl = {<std::allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<__gnu_cxx::new_allocator<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >> = {<No data fields>}, <No data fields>}, _M_start = 0xa3daf0, _M_finish = 0xa55af0, _M_end_of_storage = 0xa5daf0}}, <No data fields>}>>>>>>cb_gdb:
> info pretty-printer
[debug]> info pretty-printer
[debug]>>>>>>cb_gdb:
Looks like they are not installed properly...... I'll have a crack and report back, I still can't work out why all this isn't default in the setup...
ollydbg: this is not needed, becase gdb supports auto loading them...
pureblacksin: try this command in a terminal
$ ldd /usr/bin/gdb | grep pyt
It will tell you if gdb is compiled with python support, if the output is empty, then you have no luck.
But I'm pretty sure it will be non-empty.
Also you can search for the printer files, they are python scripts.
See what do I have on my system:
/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.0/python/libstdcxx/__init__.py
/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.0/python/libstdcxx/v6/__init__.py
/usr/share/gcc-data/x86_64-pc-linux-gnu/4.7.0/python/libstdcxx/v6/printers.py
/usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.0/32/libstdc++.so.6.0.17-gdb.py
/usr/share/gdb/auto-load/usr/lib64/gcc/x86_64-pc-linux-gnu/4.7.0/libstdc++.so.6.0.17-gdb.py
I have these for all three supported compiles I have (4.5, 4.6 and 4.7).
Right first bit had an output of:
james@ubuntu:~/python$ ldd /usr/bin/gdb | grep pyt
libpython2.7.so.1.0 => /usr/lib/libpython2.7.so.1.0 (0x00007fd03bcfc000)
I have the first three files in a couple of folders which I downloaded, they are not in those directories, I don't have those directories.
The last two, the closest I can get to that path is:
/usr/share/gdb/gdb/auto-load
This directory terminates, has two .gdb files in it neither of which look like yours.
I tried to run make in the checked out folder where the first three files were, make didn't work. I did this to see if it would generate any files...
Try to put "source ~/.gdbinit" in the initial commands in the settings.
C::B uses the -nx command line flag to tell gdb to not read the ~/.gdbinit file by default.
Right, well I got it in:
Starting debugger: /usr/bin/gdb -nx -fullname -quiet source ~/.gdbinit -args /host/James/Ubuntu/C-C++/ParseWords/bin/Debug/ParseWords
done
however -nx is still there, and still no joy, although this looks like an improvement :)