Commit 26d50599 authored by hjk's avatar hjk
Browse files

Debugger: More robust Qt version extraction with LLDB



Change-Id: I1c690e5010ade7f3ebbb4a94163d7b44da13c10d
Reviewed-by: default avatarChristian Stenger <christian.stenger@digia.com>
parent bc4dadd6
......@@ -446,13 +446,21 @@ class Dumper(DumperBase):
qtNamespace = name[:name.find('qVersion')]
self.qtNamespace = lambda: qtNamespace
res = ""
try:
res = self.parseAndEvaluate(name + '()')
except:
res = self.parseAndEvaluate('((const char*())%s)()' % name)
version = str(res)
options = lldb.SBExpressionOptions()
res = self.target.EvaluateExpression(name + '()', options)
if not res.IsValid() or not res.GetType().IsPointerType():
exp = '((const char*())%s)()' % name
res = self.target.EvaluateExpression(exp, options)
if not res.IsValid() or not res.GetType().IsPointerType():
exp = '((const char*())_Z8qVersionv)()'
res = self.target.EvaluateExpression(exp, options)
if not res.IsValid() or not res.GetType().IsPointerType():
continue
version = str(res)
if version.count('.') != 2:
continue
......
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