Commit 4456f02d authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

Debugger: Suppress Auto-Dereferencing of pointers for char* types.

Sequence of processing changed since 2.0.1.

Reviewed-by: hjk
Task-number: QTCREATORBUG-2664
parent 6a07c454
......@@ -1561,14 +1561,18 @@ class Dumper:
## Generic pointer type with format None
#warn("GENERIC AUTODEREF POINTER: %s" % value.address)
innerType = realtype.target()
self.putType(innerType)
savedCurrentChildType = self.currentChildType
self.currentChildType = stripClassTag(str(innerType))
self.putItemHelper(
Item(item.value.dereference(), item.iname, None, None))
self.currentChildType = savedCurrentChildType
self.putPointerValue(value.address)
return
innerTypeName = str(innerType.unqualified())
# Never dereference char types.
if innerTypeName != "char" and innerTypeName != "signed char" \
and innerTypeName != "unsigned char" and innerTypeName != "wchar_t":
self.putType(innerType)
savedCurrentChildType = self.currentChildType
self.currentChildType = stripClassTag(str(innerType))
self.putItemHelper(
Item(item.value.dereference(), item.iname, None, None))
self.currentChildType = savedCurrentChildType
self.putPointerValue(value.address)
return
# Fall back to plain pointer printing.
#warn("GENERIC PLAIN POINTER: %s" % value.type)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment