diff options
author | David Schulz <david.schulz@qt.io> | 2018-11-12 14:52:18 +0100 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2018-11-12 14:09:52 +0000 |
commit | 12f4ff5e5b6fe4a7ca9c5ec2ab4c210d106c2bc1 (patch) | |
tree | 050e7ad7d2d8b0932134d1646b5604aaa9a56684 /share/qtcreator | |
parent | dd350d195589af332d511baffa77ac7e5e0a2358 (diff) | |
download | qt-creator-12f4ff5e5b6fe4a7ca9c5ec2ab4c210d106c2bc1.tar.gz |
Debugger: Fix Qt version detection in the cdbbridge
broken by b2052561cca185ca18b114110ae401ad9cb43aec
Fixes: QTCREATORBUG-21446
Change-Id: I303bb943a3b39703a6c5898aab99b89d35d1d2d7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'share/qtcreator')
-rw-r--r-- | share/qtcreator/debugger/cdbbridge.py | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/share/qtcreator/debugger/cdbbridge.py b/share/qtcreator/debugger/cdbbridge.py index b7ed57d106..2e7b0a073d 100644 --- a/share/qtcreator/debugger/cdbbridge.py +++ b/share/qtcreator/debugger/cdbbridge.py @@ -323,15 +323,18 @@ class Dumper(DumperBase): return namespace def qtVersion(self): - qtVersion = self.parseAndEvaluate('((void**)&%s)[2]' % self.qtHookDataSymbolName()).integer() - if qtVersion is None and self.qtCoreModuleName() is not None: - try: - versionValue = cdbext.call(self.qtCoreModuleName() + '!qVersion()') - version = self.extractCString(self.fromNativeValue(versionValue).address()) - (major, minor, patch) = version.decode('latin1').split('.') - qtVersion = 0x10000 * int(major) + 0x100 * int(minor) + int(patch) - except: - pass + qtVersion = None + try: + qtVersion = self.parseAndEvaluate('((void**)&%s)[2]' % self.qtHookDataSymbolName()).integer() + except: + if self.qtCoreModuleName() is not None: + try: + versionValue = cdbext.call(self.qtCoreModuleName() + '!qVersion()') + version = self.extractCString(self.fromNativeValue(versionValue).address()) + (major, minor, patch) = version.decode('latin1').split('.') + qtVersion = 0x10000 * int(major) + 0x100 * int(minor) + int(patch) + except: + pass if qtVersion is None: qtVersion = self.fallbackQtVersion self.qtVersion = lambda: qtVersion |