I just noticed that GDB has this bug: (the reasons are also shown in this bug report)
Bug 15559 – Method call and calling conventionThis prevent you using a "inferior call" on the GDB, such as "p v[0]" or "p v.size()".
Test sample code below:
#include <string>
#include <vector>
int fff()
{
    return 3;
}
int main()
{
    std::vector<std::string> v;
    v.push_back("a");
    v.push_back("b");
    std::string abc = v[0];
    abc.c_str();
    abc.size();
    int i = v.size();
    i++;
    i = fff();
    return 0;      
}
GCC 4.6.x and earlier version don't cause such issue.