From 767d988891ea7ea376e1e807fe921c9001b4abdf Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 27 Mar 2017 07:59:18 +0200 Subject: [PATCH] Debugger: Cache reference to an unresolvables type as struct This fixes throwing an uncaught exception if local variables contain arrays or pointer to a type that can not be looked up. Change-Id: If9407e5cf5d86bb89594266d4122a53dd65a80bb Reviewed-by: Christian Stenger --- share/qtcreator/debugger/cdbbridge.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py index 1bbc2793acf..211b595efe9 100644 --- a/share/qtcreator/debugger/cdbbridge.py +++ b/share/qtcreator/debugger/cdbbridge.py @@ -153,20 +153,20 @@ class Dumper(DumperBase): code = nativeType.code() if code == TypeCodePointer: - if nativeType.name().startswith(''): - code = TypeCodeFunction - else: + if not nativeType.name().startswith(''): targetType = self.lookupType(nativeType.targetName(), nativeType.moduleId()) - return self.createPointerType(targetType) + if targetType is not None: + return self.createPointerType(targetType) + code = TypeCodeFunction if code == TypeCodeArray: # cdb reports virtual function tables as arrays those ar handled separetly by # the DumperBase. Declare those types as structs prevents a lookup to a none existing type - if nativeType.name().startswith('__fptr()') or nativeType.name().startswith('