forked from qt-creator/qt-creator
Debugger: Avoid decoding error when fetching native value
Change-Id: I4cfe144c7d96134e373e6d6d6141eb05a7dfe911 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -110,7 +110,10 @@ class Dumper(DumperBase):
|
|||||||
# There is no cdb api for the size of bitfields.
|
# There is no cdb api for the size of bitfields.
|
||||||
# Workaround this issue by parsing the native debugger text for integral types.
|
# Workaround this issue by parsing the native debugger text for integral types.
|
||||||
if val.type.code == TypeCode.Integral:
|
if val.type.code == TypeCode.Integral:
|
||||||
integerString = nativeValue.nativeDebuggerValue()
|
try:
|
||||||
|
integerString = nativeValue.nativeDebuggerValue()
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
integerString = '' # cannot decode - read raw
|
||||||
if integerString == 'true':
|
if integerString == 'true':
|
||||||
val.ldata = int(1).to_bytes(1, byteorder='little')
|
val.ldata = int(1).to_bytes(1, byteorder='little')
|
||||||
elif integerString == 'false':
|
elif integerString == 'false':
|
||||||
|
Reference in New Issue
Block a user