forked from qt-creator/qt-creator
Debugger: std::vector<bool> re-fix
Change-Id: Ia37f6a0ad0b9b59439f916e7ca93ee3bb9812fa1 Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
@@ -521,7 +521,7 @@ def qdump__std__vector(d, value):
|
|||||||
start = impl["_M_start"]["_M_p"]
|
start = impl["_M_start"]["_M_p"]
|
||||||
finish = impl["_M_finish"]["_M_p"]
|
finish = impl["_M_finish"]["_M_p"]
|
||||||
# FIXME: 8 is CHAR_BIT
|
# 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_finish"]["_M_offset"])
|
||||||
size -= int(impl["_M_start"]["_M_offset"])
|
size -= int(impl["_M_start"]["_M_offset"])
|
||||||
else:
|
else:
|
||||||
@@ -540,10 +540,11 @@ def qdump__std__vector(d, value):
|
|||||||
if d.isExpanded():
|
if d.isExpanded():
|
||||||
if isBool:
|
if isBool:
|
||||||
with Children(d, size, maxNumChild=10000, childType=type):
|
with Children(d, size, maxNumChild=10000, childType=type):
|
||||||
|
base = d.pointerValue(start)
|
||||||
for i in d.childRange():
|
for i in d.childRange():
|
||||||
q = start + int(i / storagesize)
|
q = base + int(i / 8)
|
||||||
d.putBoolItem(str(i),
|
d.putBoolItem(str(i),
|
||||||
(int(q.dereference()) >> (i % storagesize)) & 1)
|
(int(d.dereference(q)) >> (i % 8)) & 1)
|
||||||
else:
|
else:
|
||||||
d.putArrayData(type, start, size)
|
d.putArrayData(type, start, size)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user