From 97bfda8f419b4a35dcd69bf014a2c80671a24b17 Mon Sep 17 00:00:00 2001 From: hjk <hjk121@nokiamail.com> Date: Thu, 28 Nov 2013 10:35:38 +0100 Subject: [PATCH] Debugger: std::vector<bool> re-fix Change-Id: Ia37f6a0ad0b9b59439f916e7ca93ee3bb9812fa1 Reviewed-by: hjk <hjk121@nokiamail.com> --- share/qtcreator/debugger/stdtypes.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py index 0b1484a8425..6ec1e0b5980 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) -- GitLab