forked from qt-creator/qt-creator
debugger: Fix RecursionError when fetching Qt version
When working with statically linked Qt qVersion may not be available. In that case Qt uses the qtHookData which has type of quintptr. This type is subject to SyntheticChildrenProvider because lldb hooks are set up via a regular expression. When SyntheticChildrenProvider is instantiated, it tries to fetch Qt version, which causes another instantiation which again recurses. The fix is to bypass SyntheticChildrenProvider via GetNonSyntheticValue. Change-Id: Id00cdb3d0a0895bb02e4b3e4504c574d89be2ed0 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
@@ -745,7 +745,7 @@ class Dumper(DumperBase):
|
||||
return (qtNamespace, qtVersion)
|
||||
|
||||
try:
|
||||
versionValue = self.target.EvaluateExpression('qtHookData[2]')
|
||||
versionValue = self.target.EvaluateExpression('qtHookData[2]').GetNonSyntheticValue()
|
||||
if versionValue.IsValid():
|
||||
return ('', versionValue.unsigned)
|
||||
except:
|
||||
|
Reference in New Issue
Block a user