Debugger: Fix Bitfield dumper for LLDB with Python 3

Strangely enough, this issue did not trigger with GDB for either
Python 3 or 2.

Change-Id: I0e5cf7ce0a8605f105bff549634aa014ef1f8403
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2020-12-10 15:27:13 +01:00
parent 919ffcb0fb
commit b3ad621e0a

View File

@@ -3159,10 +3159,13 @@ class DumperBase():
for i in range(fieldSize):
data = data << 8
if self.dumper.isBigEndian:
byte = ldata[i]
lbyte = ldata[i]
else:
byte = ldata[fieldOffset + fieldSize - 1 - i]
data += ord(byte)
lbyte = ldata[fieldOffset + fieldSize - 1 - i]
if sys.version_info[0] >= 3:
data += lbyte
else:
data += ord(lbyte)
data = data >> fieldBitpos
data = data & ((1 << fieldBitsize) - 1)
val.lvalue = data