Commit 6dc03f72 authored by hjk's avatar hjk
Browse files

Debugger: Use a more robust fallback for SBValue.Dereference



Change-Id: Ie81899017c7e711ea8b04d85f8298b0d73f1cbab
(cherry picked from commit 88114aba3ef4ccf2d1597e9a21dd49efb8c86717)
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 7df04793
......@@ -189,10 +189,8 @@ def impl_SBValue__deref(value):
result = value.Dereference()
if result.IsValid():
return result
#warn("RESULT.LOADADDRESS A: 0x%x" % result.GetLoadAddress())
result = value.CreateValueFromAddress(None, value.GetValueAsUnsigned(), value.GetType().GetPointerType())
#warn("RESULT.LOADADDRESS B: 0x%x" % result.GetLoadAddress())
return result
exp = "*(class %s*)0x%x" % (value.GetType().GetPointeeType(), value.GetValueAsUnsigned())
return value.CreateValueFromExpression(None, exp)
lldb.SBValue.__add__ = impl_SBValue__add__
lldb.SBValue.__sub__ = impl_SBValue__sub__
......@@ -1046,6 +1044,7 @@ class Dumper(DumperBase):
for i in xrange(m, n):
#for i in range(n):
child = value.GetChildAtIndex(i)
# Only needed in the QVariant4 test.
if int(child.GetLoadAddress()) == 0xffffffffffffffff:
typeClass = child.GetType().GetTypeClass()
if typeClass != lldb.eTypeClassBuiltin:
......
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