Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
...@@ -521,7 +521,7 @@ def qdump__std__vector(d, value): ...@@ -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): ...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment