forked from qt-creator/qt-creator
Debugger: Hardcode QChar type
QChar lookup doesn't always return the expected type. Get ahead of this by hardcoding the type data on initialization. Change-Id: Ie25c27521afeddc3da917242ce64df3901bcc80b Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -292,6 +292,7 @@ class DumperBase:
|
|||||||
self.currentPrintsAddress = True
|
self.currentPrintsAddress = True
|
||||||
self.currentChildType = None
|
self.currentChildType = None
|
||||||
self.currentChildNumChild = None
|
self.currentChildNumChild = None
|
||||||
|
self.registerKnownTypes()
|
||||||
|
|
||||||
def setVariableFetchingOptions(self, args):
|
def setVariableFetchingOptions(self, args):
|
||||||
self.resultVarName = args.get('resultvarname', '')
|
self.resultVarName = args.get('resultvarname', '')
|
||||||
@@ -494,6 +495,23 @@ class DumperBase:
|
|||||||
nativeType = self.lookupNativeType(typeName)
|
nativeType = self.lookupNativeType(typeName)
|
||||||
return None if nativeType is None else self.fromNativeType(nativeType)
|
return None if nativeType is None else self.fromNativeType(nativeType)
|
||||||
|
|
||||||
|
def registerKnownTypes(self):
|
||||||
|
typeId = 'QChar'
|
||||||
|
tdata = self.TypeData(self)
|
||||||
|
tdata.name = typeId
|
||||||
|
tdata.typeId = typeId
|
||||||
|
tdata.lbitsize = 16
|
||||||
|
tdata.code = TypeCodeStruct
|
||||||
|
field = self.Field(self)
|
||||||
|
field.name = 'ucs'
|
||||||
|
field.ltype = self.lookupType('unsigned short')
|
||||||
|
field.lbitsize = 16
|
||||||
|
field.lbitpos = 0
|
||||||
|
tdata.lfields = [field]
|
||||||
|
tdata.lalignment = 2
|
||||||
|
tdata.templateArguments = []
|
||||||
|
self.registerType(typeId, tdata)
|
||||||
|
|
||||||
def nativeDynamicType(self, address, baseType):
|
def nativeDynamicType(self, address, baseType):
|
||||||
return baseType # Override in backends.
|
return baseType # Override in backends.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user