Commit 11dd4ab7 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Debugger: Fix swapped object/original addresses

Task-number: QTCREATORBUG-17938
Change-Id: I71773893c2dde784c5d3f4c63e7efbbdad13916c
Reviewed-by: default avatarhjk <hjk@qt.io>
Reviewed-by: Christian Stenger's avatarChristian Stenger <christian.stenger@qt.io>
parent 5009bafe
......@@ -1320,9 +1320,10 @@ class DumperBase:
derefValue.name = '*'
self.putItem(derefValue)
self.currentChildType = savedCurrentChildType
self.putOriginalAddress(value.pointer())
self.putAddress(value.address())
def putFormattedPointerX(self, value):
self.putOriginalAddress(value.address())
#warn("PUT FORMATTED: %s" % value)
pointer = value.pointer()
#warn('POINTER: 0x%x' % pointer)
......@@ -2671,7 +2672,6 @@ class DumperBase:
typeName = typeobj.name
self.addToCache(typeobj) # Fill type cache
self.putAddress(value.address())
if not value.lIsInScope:
self.putSpecialValue('optimizedout')
......@@ -2685,6 +2685,10 @@ class DumperBase:
# Try on possibly typedefed type first.
if self.tryPutPrettyItem(typeName, value):
if typeobj.code == TypeCodePointer:
self.putOriginalAddress(value.address())
else:
self.putAddress(value.address())
return
if typeobj.code == TypeCodeTypedef:
......@@ -2697,6 +2701,8 @@ class DumperBase:
self.putFormattedPointer(value)
return
self.putAddress(value.address())
if typeobj.code == TypeCodeFunction:
#warn('FUNCTION VALUE: %s' % value)
self.putType(typeobj)
......
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