forked from qt-creator/qt-creator
Debugger: prevent calling functions with gdb on windows
and adjust tests accordingly Change-Id: I172e08cfccc248eea06a94208c9e8e312d69e334 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -1117,7 +1117,8 @@ class Dumper(DumperBase):
|
|||||||
self.qtCustomEventPltFunc = self.findSymbol(sym)
|
self.qtCustomEventPltFunc = self.findSymbol(sym)
|
||||||
|
|
||||||
sym = '_ZNK%s7QObject8propertyEPKc' % strns
|
sym = '_ZNK%s7QObject8propertyEPKc' % strns
|
||||||
self.qtPropertyFunc = self.findSymbol(sym)
|
if not self.isWindowsTarget(): # prevent calling the property function on windows
|
||||||
|
self.qtPropertyFunc = self.findSymbol(sym)
|
||||||
|
|
||||||
def assignValue(self, args):
|
def assignValue(self, args):
|
||||||
typeName = self.hexdecode(args['type'])
|
typeName = self.hexdecode(args['type'])
|
||||||
|
@@ -1982,18 +1982,9 @@ def qdump__QVariant(d, value):
|
|||||||
if d.isExpanded():
|
if d.isExpanded():
|
||||||
innerType = None
|
innerType = None
|
||||||
with Children(d):
|
with Children(d):
|
||||||
ev = d.parseAndEvaluate
|
try:
|
||||||
p = None
|
p = d.call('const char *', value, 'typeName')
|
||||||
if p is None:
|
except:
|
||||||
# Without debug info.
|
|
||||||
symbol = d.mangleName(d.qtNamespace() + 'QMetaType::typeName') + 'i'
|
|
||||||
p = ev('((const char *(*)(int))%s)(%d)' % (symbol, variantType))
|
|
||||||
#if p is None:
|
|
||||||
# p = ev('((const char *(*)(int))%sQMetaType::typeName)(%d)' % (ns, variantType))
|
|
||||||
if p is None:
|
|
||||||
# LLDB on Linux
|
|
||||||
p = ev('((const char *(*)(int))QMetaType::typeName)(%d)' % variantType)
|
|
||||||
if p is None:
|
|
||||||
d.putSpecialValue('notcallable')
|
d.putSpecialValue('notcallable')
|
||||||
return None
|
return None
|
||||||
ptr = p.pointer()
|
ptr = p.pointer()
|
||||||
|
@@ -3992,22 +3992,22 @@ void tst_Dumpers::dumper_data()
|
|||||||
+ Check("my.1.value", "<1 items>", "@QStringList")
|
+ Check("my.1.value", "<1 items>", "@QStringList")
|
||||||
+ Check("my.1.value.0", "[0]", "\"World\"", "@QString")
|
+ Check("my.1.value.0", "[0]", "\"World\"", "@QString")
|
||||||
//+ CheckType("v2", "@QVariant (MyType)")
|
//+ CheckType("v2", "@QVariant (MyType)")
|
||||||
+ Check("v2.data.0.key", "1", "unsigned int") % NoCdbEngine
|
+ Check("v2.data.0.key", "1", "unsigned int") % NeedsInferiorCall
|
||||||
+ Check("v2.data.0.value", "<1 items>", "@QStringList") % NoCdbEngine
|
+ Check("v2.data.0.value", "<1 items>", "@QStringList") % NeedsInferiorCall
|
||||||
+ Check("v2.data.0.value.0", "[0]", "\"Hello\"", "@QString") % NoCdbEngine
|
+ Check("v2.data.0.value.0", "[0]", "\"Hello\"", "@QString") % NeedsInferiorCall
|
||||||
+ Check("v2.data.1.key", "3", "unsigned int") % NoCdbEngine
|
+ Check("v2.data.1.key", "3", "unsigned int") % NeedsInferiorCall
|
||||||
+ Check("v2.data.1.value", "<1 items>", "@QStringList") % NoCdbEngine
|
+ Check("v2.data.1.value", "<1 items>", "@QStringList") % NeedsInferiorCall
|
||||||
+ Check("v2.data.1.value.0", "[0]", "\"World\"", "@QString") % NoCdbEngine
|
+ Check("v2.data.1.value.0", "[0]", "\"World\"", "@QString") % NeedsInferiorCall
|
||||||
|
|
||||||
+ Check("list", "<3 items>", "@QList<int>")
|
+ Check("list", "<3 items>", "@QList<int>")
|
||||||
+ Check("list.0", "[0]", "1", "int")
|
+ Check("list.0", "[0]", "1", "int")
|
||||||
+ Check("list.1", "[1]", "2", "int")
|
+ Check("list.1", "[1]", "2", "int")
|
||||||
+ Check("list.2", "[2]", "3", "int")
|
+ Check("list.2", "[2]", "3", "int")
|
||||||
//+ Check("v3", "", "@QVariant (@QList<int>)")
|
//+ Check("v3", "", "@QVariant (@QList<int>)")
|
||||||
+ Check("v3.data", "<3 items>", TypePattern(".*QList<int>")) % NoCdbEngine
|
+ Check("v3.data", "<3 items>", TypePattern(".*QList<int>")) % NeedsInferiorCall
|
||||||
+ Check("v3.data.0", "[0]", "1", "int") % NoCdbEngine
|
+ Check("v3.data.0", "[0]", "1", "int") % NeedsInferiorCall
|
||||||
+ Check("v3.data.1", "[1]", "2", "int") % NoCdbEngine
|
+ Check("v3.data.1", "[1]", "2", "int") % NeedsInferiorCall
|
||||||
+ Check("v3.data.2", "[2]", "3", "int") % NoCdbEngine;
|
+ Check("v3.data.2", "[2]", "3", "int") % NeedsInferiorCall;
|
||||||
|
|
||||||
|
|
||||||
QTest::newRow("QVariant2")
|
QTest::newRow("QVariant2")
|
||||||
@@ -4221,8 +4221,8 @@ void tst_Dumpers::dumper_data()
|
|||||||
//+ Check("ha1.protocol", "IPv4Protocol",
|
//+ Check("ha1.protocol", "IPv4Protocol",
|
||||||
// "@QAbstractSocket::NetworkLayerProtocol") % LldbEngine
|
// "@QAbstractSocket::NetworkLayerProtocol") % LldbEngine
|
||||||
+ Check("ha1.scopeId", "\"\"", "@QString")
|
+ Check("ha1.scopeId", "\"\"", "@QString")
|
||||||
+ Check("var", "", "@QVariant (@QHostAddress)") % NoCdbEngine
|
+ Check("var", "", "@QVariant (@QHostAddress)") % NeedsInferiorCall
|
||||||
+ Check("var.data", ValuePattern(".*127.0.0.1.*"), "@QHostAddress") % NoCdbEngine;
|
+ Check("var.data", ValuePattern(".*127.0.0.1.*"), "@QHostAddress") % NeedsInferiorCall;
|
||||||
|
|
||||||
|
|
||||||
QTest::newRow("QVariantList")
|
QTest::newRow("QVariantList")
|
||||||
|
Reference in New Issue
Block a user