diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index 0250be1741c..33787c70110 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -3457,7 +3457,11 @@ static void qDumpStdVector(QDumper &d) #ifdef Q_CC_MSVC // Pointers are at end of the structure const char * vcp = static_cast(d.data); +# if _MSC_VER >= 1600 // VS2010 onwards: Beginning of structure + base class containing pointer + const VectorImpl *v = reinterpret_cast(vcp + sizeof(void*)); +# else // pre VS2010: End of structure const VectorImpl *v = reinterpret_cast(vcp + sizeof(std::vector) - sizeof(VectorImpl)); +# endif // _MSC_VER #else const VectorImpl *v = static_cast(d.data); #endif