Can you tell me the output of the command "whatis v" at the cout line?
Update:
I've tested it and here is the output
This means that there is no way to make it work.
I'll try to fix the string problem, thought
Update2:
Here is the patch for the string parsing:
Index: src/scripts/gdb_types.script
===================================================================
--- src/scripts/gdb_types.script (revision 5837)
+++ src/scripts/gdb_types.script (working copy)
@@ -24,7 +24,7 @@
// STL String
driver.RegisterType(
_T("STL String"),
- _T("^std::basic_string<.*>$"),
+ _T("(^std::basic_string<.*)|(^string$)|(^const string$)|(^string &$)|(^const string &$)"),
_T("Evaluate_StlString"),
_T("Parse_StlString")
);
@@ -32,7 +32,7 @@
// STL Vector
driver.RegisterType(
_T("STL Vector"),
- _T("^std::vector<(.*)>$"),
+ _T("^std::vector<.*"),
_T("Evaluate_StlVector"),
_T("Parse_StlVector")
);
@@ -109,16 +109,17 @@
function Evaluate_StlString(type, a_str, start, count)
{
+ local v_str = _T("(") + a_str + _T(")");
local oper = _T(".");
if (type.Find(_T("*"), false) > 0)
oper = _T("->");
- local result = _T("output ") + a_str + oper + _T("c_str()[") + start + _T("]@");
+ local result = _T("output ") + v_str + oper + _T("c_str()[") + start + _T("]@");
if (count != 0)
result = result + count;
else
- result = result + a_str + oper + _T("size()");
+ result = result + v_str + oper + _T("size()");
return result;
}
If you find a case where it doesn't work, please report it and provide a simple example.
p.s. patch is in the debugger branch
Update3:
ptype command can help to solve the vector issue, but the output of it is quite big and complete