Debugger: Explicitly report chars as integer values with LLDB

This brings it into line with GDB output and is needed in
the frontend to provide normal integral value base changes.

Change-Id: I17adc7730419648d45c0d5866311de33bf01a7f0
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
This commit is contained in:
hjk
2015-04-14 12:43:04 +02:00
parent f7d794dc9d
commit dcf3ba5009

View File

@@ -1082,6 +1082,20 @@ class Dumper(DumperBase):
self.putFormattedPointer(value)
return
# Chars
if typeClass == lldb.eTypeClassBuiltin:
basicType = value.GetType().GetBasicType()
if basicType == lldb.eBasicTypeChar:
self.putValue(value.GetValueAsUnsigned())
self.putType(typeName)
self.putNumChild(0)
return
if basicType == lldb.eBasicTypeSignedChar:
self.putValue(value.GetValueAsSigned())
self.putType(typeName)
self.putNumChild(0)
return
#warn("VALUE: %s" % value)
#warn("FANCY: %s" % self.useFancy)
if self.tryPutPrettyItem(typeName, value):