Commit 88ff6cd5 authored by hjk's avatar hjk

Debugger: Use a more direct way to detect LLDB bitfields

It has a function directly doing that, use it instead of
guessing (badly, in some cases)

Change-Id: I1ce317c28d60f820f8e868e3c0c5a665f8de6cb7
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 80b2a4f1
......@@ -247,7 +247,7 @@ class Dumper(DumperBase):
if bitsize > 0:
#bitpos = bitpos % bitsize
bitpos = bitpos % 8 # Reported type is always wrapping type!
fieldBits[f.name] = (bitsize, bitpos)
fieldBits[f.name] = (bitsize, bitpos, f.IsBitfield())
# Normal members and non-empty base classes.
for i in range(fakeValue.GetNumChildren()):
......@@ -259,11 +259,12 @@ class Dumper(DumperBase):
nativeFieldType = nativeField.GetType()
if field.name in fieldBits:
(field.lbitsize, field.lbitpos) = fieldBits[field.name]
(field.lbitsize, field.lbitpos, isBitfield) = fieldBits[field.name]
else:
field.lbitsize = nativeFieldType.GetByteSize() * 8
isBitfield = False
if field.lbitsize != nativeFieldType.GetByteSize() * 8:
if isBitfield:
field.ltype = self.createBitfieldType(self.typeName(nativeFieldType), field.lbitsize)
else:
fakeMember = fakeValue.GetChildAtIndex(i)
......
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