Commit e149c0da authored by hjk's avatar hjk Committed by Christian Stenger
Browse files

Debugger: Fix LLDB's field size reporting



Use the field's type size if the reported field size is 0.

Change-Id: I7db49507d0ea7358b6db27dfa206f2b079bbf876
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 979b034d
......@@ -239,8 +239,12 @@ class Dumper(DumperBase):
base = nativeType.GetVirtualBaseClassAtIndex(i)
virtualNames[base.GetName()] = i
fieldBits = dict((field.name, (field.GetBitfieldSizeInBits(), field.GetOffsetInBits()))
for field in nativeType.get_fields_array())
fieldBits = dict((f.name,
((f.GetBitfieldSizeInBits()
if f.GetBitfieldSizeInBits() else
(f.GetType().GetByteSize() * 8)),
f.GetOffsetInBits()))
for f in nativeType.get_fields_array())
#warn("BASE NAMES: %s" % baseNames)
#warn("VIRTUAL NAMES: %s" % virtualNames)
......@@ -299,7 +303,7 @@ class Dumper(DumperBase):
field.parentType = fieldParentType
field.ltype = self.fromNativeType(fieldType)
field.name = fieldName
field.lbitsize = 0
field.lbitsize = field.ltype.lbitsize * 8
field.lbitpos = 0
fields.append(field)
......
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