diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py
index 0b1484a84256aa983585af8760f89c418c270b53..6ec1e0b59807ace6d53736f951b0a5dd354c09e4 100644
--- a/share/qtcreator/debugger/stdtypes.py
+++ b/share/qtcreator/debugger/stdtypes.py
@@ -521,7 +521,7 @@ def qdump__std__vector(d, value):
         start = impl["_M_start"]["_M_p"]
         finish = impl["_M_finish"]["_M_p"]
         # FIXME: 8 is CHAR_BIT
-        size = (int(finish) - int(start)) * 8
+        size = (d.pointerValue(finish) - d.pointerValue(start)) * 8
         size += int(impl["_M_finish"]["_M_offset"])
         size -= int(impl["_M_start"]["_M_offset"])
     else:
@@ -540,10 +540,11 @@ def qdump__std__vector(d, value):
     if d.isExpanded():
         if isBool:
             with Children(d, size, maxNumChild=10000, childType=type):
+                base = d.pointerValue(start)
                 for i in d.childRange():
-                    q = start + int(i / storagesize)
+                    q = base + int(i / 8)
                     d.putBoolItem(str(i),
-                        (int(q.dereference()) >> (i % storagesize)) & 1)
+                        (int(d.dereference(q)) >> (i % 8)) & 1)
         else:
             d.putArrayData(type, start, size)