forked from qt-creator/qt-creator
Debugger: Fix QObject property extraction in namespaced Qt builds
Bail out on error results as early as possible. The accessor always exists in libQt5Core, but it can't be found when using a wrongly mangled name. Use the right one, and add another sanity check before actually using the function. Change-Id: I57975be188ca6b03836c0968e59d9603b0eecf27 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1862,7 +1862,7 @@ class DumperBase:
|
|||||||
for i in range(propertyCount):
|
for i in range(propertyCount):
|
||||||
t = self.split('III', dataPtr + properties * 4 + 12 * i)
|
t = self.split('III', dataPtr + properties * 4 + 12 * i)
|
||||||
name = self.metaString(metaObjectPtr, t[0], revision)
|
name = self.metaString(metaObjectPtr, t[0], revision)
|
||||||
if qobject:
|
if qobject and self.qtPropertyFunc:
|
||||||
# LLDB doesn't like calling it on a derived class, possibly
|
# LLDB doesn't like calling it on a derived class, possibly
|
||||||
# due to type information living in a different shared object.
|
# due to type information living in a different shared object.
|
||||||
#base = self.createValue(qobjectPtr, '@QObject')
|
#base = self.createValue(qobjectPtr, '@QObject')
|
||||||
@@ -1879,6 +1879,10 @@ class DumperBase:
|
|||||||
continue
|
continue
|
||||||
#warn('COULD NOT EXECUTE: %s' % cmd)
|
#warn('COULD NOT EXECUTE: %s' % cmd)
|
||||||
#self.putCallItem(name, '@QVariant', base, 'property', '"' + name + '"')
|
#self.putCallItem(name, '@QVariant', base, 'property', '"' + name + '"')
|
||||||
|
if res is None:
|
||||||
|
self.bump('failedMetaObjectCall2')
|
||||||
|
putt(name, ' ')
|
||||||
|
continue
|
||||||
self.putSubItem(name, res)
|
self.putSubItem(name, res)
|
||||||
else:
|
else:
|
||||||
putt(name, ' ')
|
putt(name, ' ')
|
||||||
|
@@ -1060,7 +1060,7 @@ class Dumper(DumperBase):
|
|||||||
sym = '_ZN7QObject11customEventEP6QEvent@plt'
|
sym = '_ZN7QObject11customEventEP6QEvent@plt'
|
||||||
self.qtCustomEventPltFunc = self.findSymbol(sym)
|
self.qtCustomEventPltFunc = self.findSymbol(sym)
|
||||||
|
|
||||||
sym = '_ZNK7%sQObject8propertyEPKc' % strns
|
sym = '_ZNK%s7QObject8propertyEPKc' % strns
|
||||||
self.qtPropertyFunc = self.findSymbol(sym)
|
self.qtPropertyFunc = self.findSymbol(sym)
|
||||||
|
|
||||||
# This might be wrong, but we can't do better: We found
|
# This might be wrong, but we can't do better: We found
|
||||||
|
Reference in New Issue
Block a user