From a590f8de05e660d9d31f91cc0a5bfb2815b644a5 Mon Sep 17 00:00:00 2001 From: hjk <hjk121@nokiamail.com> Date: Wed, 23 Oct 2013 12:29:38 +0200 Subject: [PATCH] Debugger: Fix some of the array dumpers with LLDB Change-Id: Ie2b12a526ff7199bcadfc21a3deb5354063a3e3b Reviewed-by: hjk <hjk121@nokiamail.com> --- share/qtcreator/debugger/dumper.py | 5 +++-- share/qtcreator/debugger/stdtypes.py | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py index 9de1ed38e13..55aaff207df 100644 --- a/share/qtcreator/debugger/dumper.py +++ b/share/qtcreator/debugger/dumper.py @@ -181,11 +181,12 @@ class Children: self.childNumChild = childNumChild try: if not addrBase is None and not addrStep is None: - self.d.put('addrbase="0x%x",' % long(addrBase)) - self.d.put('addrstep="0x%x",' % long(addrStep)) + self.d.put('addrbase="0x%x",' % toInteger(addrBase)) + self.d.put('addrstep="0x%x",' % toInteger(addrStep)) self.printsAddress = False except: warn("ADDRBASE: %s" % addrBase) + warn("ADDRSTEP: %s" % addrStep) #warn("CHILDREN: %s %s %s" % (numChild, childType, childNumChild)) def __enter__(self): diff --git a/share/qtcreator/debugger/stdtypes.py b/share/qtcreator/debugger/stdtypes.py index 4d6ac1bd1a9..d0fac283c0b 100644 --- a/share/qtcreator/debugger/stdtypes.py +++ b/share/qtcreator/debugger/stdtypes.py @@ -38,7 +38,7 @@ def qdump____c_style_array__(d, value): format = d.currentItemFormat() isDefault = format == None and str(targetType.unqualified()) == "char" if isDefault or format == 0 or format == 1 or format == 2: - blob = d.readMemory(value.address, type.sizeof) + blob = d.readMemory(d.addressOf(value), type.sizeof) if isDefault: # Use Latin1 as default for char []. @@ -56,7 +56,7 @@ def qdump____c_style_array__(d, value): d.putValue("@0x%x" % d.pointerValue(value.cast(targetType.pointer()))) if d.currentIName in d.expandedINames: - p = value.address + p = d.addressOf(value) ts = targetType.sizeof if not d.tryPutArrayContents(targetType, p, int(type.sizeof / ts)): with Children(d, childType=targetType, -- GitLab