I recently started using C::B and like it a lot. One thing has been bothering me though. Is there anyway to see the contents of a std vector in the debugger? After a lot of experimenting I found two partial solutions:
1) Apparently the gdb_types script is supposed to support std vectors. It didn't work for me so I edited it so that the function Evaluate_StlVector is defined as
function Evaluate_StlVector(type, a_str, start, count)
{
return _T("p *(") + a_str + _T("._M_impl._M_start)");
}
and the Parse_StlVector just returns the a_str string.
This gives me the first element of the list in the toolpoint but the "watches" window doesn't. How can I get this output to be displayed in the watches window?
2) On the "yolinux" site I found a gdbinit file that supports vectors. But when I put the "pvector" command (as explained on that site) in the gdb_types file or into the command line during a debugging session I get an error saying that the command doesn't exist. How can I get C::B to read the gdbinit file? I tried putting it in my home directory and in the project directory with no results.
Is there another, or better way to add std vector support?
Thanks.