Commit c24640ba authored by hjk's avatar hjk
Browse files

Debugger: Use SBTarget.CreateValueFromAddress instead of SBValue



SBTarget.CreateValueFromAddress was not supported by older
versions of LLDB. Unfortunately, we still can't use
SBTarget.CreateValueFromExpression.

Change-Id: I982021531a2ab070aa279dd17e9714f86efe83cc
Reviewed-by: default avatarChristian Stenger <christian.stenger@theqtcompany.com>
parent 08ad4bef
......@@ -579,11 +579,17 @@ class Dumper(DumperBase):
def createPointerValue(self, address, pointeeType):
addr = int(address) & 0xFFFFFFFFFFFFFFFF
return self.context.CreateValueFromAddress(None, addr, pointeeType).AddressOf()
sbaddr = lldb.SBAddress(addr, self.target)
# Any type.
# FIXME: This can be replaced with self.target.CreateValueFromExpression
# as soon as we drop support for lldb builds not having that (~Xcode 6.1)
dummy = self.target.CreateValueFromAddress('@', sbaddr, self.target.FindFirstType('char'))
return dummy.CreateValueFromExpression('', '(%s*)%s' % (pointeeType, addr))
def createValue(self, address, referencedType):
addr = int(address) & 0xFFFFFFFFFFFFFFFF
return self.context.CreateValueFromAddress(None, addr, referencedType)
sbaddr = lldb.SBAddress(addr, self.target)
return self.target.CreateValueFromAddress(None, sbaddr, referencedType)
def childRange(self):
if self.currentMaxNumChild is None:
......
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