Debugger: Avoid decoding error when fetching native value

Change-Id: I4cfe144c7d96134e373e6d6d6141eb05a7dfe911
Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
Christian Stenger
2020-07-31 14:59:56 +02:00
parent c25a40f6ed
commit c6c320a6ea

View File

@@ -110,7 +110,10 @@ class Dumper(DumperBase):
# There is no cdb api for the size of bitfields.
# Workaround this issue by parsing the native debugger text for integral types.
if val.type.code == TypeCode.Integral:
integerString = nativeValue.nativeDebuggerValue()
try:
integerString = nativeValue.nativeDebuggerValue()
except UnicodeDecodeError:
integerString = '' # cannot decode - read raw
if integerString == 'true':
val.ldata = int(1).to_bytes(1, byteorder='little')
elif integerString == 'false':