Commit 97bfda8f authored by hjk's avatar hjk
Browse files

Debugger: std::vector<bool> re-fix



Change-Id: Ia37f6a0ad0b9b59439f916e7ca93ee3bb9812fa1
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent f2984ad1
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment