forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user