From 05d7070178fa7ae3734a6530c7da058897bc8c39 Mon Sep 17 00:00:00 2001 From: Ilya Kulakov Date: Sat, 27 Jan 2024 00:25:10 -0800 Subject: [PATCH] debugger: Fix RecursionError when fetching Qt version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Tor Arne Vestbø --- share/qtcreator/debugger/lldbbridge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/qtcreator/debugger/lldbbridge.py b/share/qtcreator/debugger/lldbbridge.py index 86c784b4e22..7558bcdfa47 100644 --- a/share/qtcreator/debugger/lldbbridge.py +++ b/share/qtcreator/debugger/lldbbridge.py @@ -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: