Hi, all, I can successfully view the vectors.
Here is the debug log output from "debugger (debug)" panel.
>>>>>>cb_gdb:
> pvector v
elem[0]: $1 = {
static npos = 4294967295,
_M_dataplus = {
<std::allocator<char>> = {
<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
_M_p = 0x3247c "bla bla"
}
}
elem[1]: $2 = {
static npos = 4294967295,
_M_dataplus = {
<std::allocator<char>> = {
<__gnu_cxx::new_allocator<char>> = {<No data fields>}, <No data fields>},
members of std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Alloc_hider:
_M_p = 0x324ac "abcdef"
}
}
Vector size = 2
Vector capacity = 2
Element type = std::basic_string<char, std::char_traits<char>, std::allocator<char> > *
There are several steps:
1. copy the "
stl-views-1.0.3.gdb" file to the project directory.( This directory serves as working directory as GDB.exe starts)
2. In the Menu->setting->compiler and debuggers dialog.
Add "source stl-views-1.0.3.gdb" to the debugger initialization command control.
3. start debugging!
4.In the Menu->debug->set user command to the debug dialog.
Enter " pvector v"
5, the v will be shown
By the way, I think the "set user command to the debug" dialog should be embeded in the "debugger(debug" panel, so, people don't need to open it again and again. (seems to annoying).