diff --git a/share/qtcreator/dumper/dumper.py b/share/qtcreator/dumper/dumper.py index d762c328471..46d336097c2 100644 --- a/share/qtcreator/dumper/dumper.py +++ b/share/qtcreator/dumper/dumper.py @@ -340,17 +340,21 @@ class Children: self.addrBase = addrBase self.addrStep = addrStep self.printsAddress = True - if not childType is None: + if childType is None: + self.childType = None + else: self.childType = stripClassTag(str(childType)) self.d.put('childtype="%s",' % self.childType) - if isSimpleType(childType): - self.d.put('childnumchild="0",') - self.childNumChild = 0 - elif childType.code == PointerCode: - self.d.put('childnumchild="1",') - self.childNumChild = 1 - else: - self.childType = None + if childNumChild is None: + if isSimpleType(childType): + self.d.put('childnumchild="0",') + self.childNumChild = 0 + elif childType.code == PointerCode: + self.d.put('childnumchild="1",') + self.childNumChild = 1 + else: + self.d.put('childnumchild="%s",' % childNumChild) + self.childNumChild = childNumChild try: if not addrBase is None and not addrStep is None: self.d.put('addrbase="0x%x",' % long(addrBase)) diff --git a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp index f32a0d5dc67..3818315b9f6 100644 --- a/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp +++ b/tests/manual/gdbdebugger/simple/simple_gdbtest_app.cpp @@ -2671,12 +2671,27 @@ namespace basic { dummyStatement(&a, &b, &c, &d); } - void testLongEvaluation() + void testLongEvaluation1() { QDateTime time = QDateTime::currentDateTime(); - QVector bigv; - for (int i = 0; i < 10000; ++i) - bigv.append(time); + const int N = 10000; + QDateTime bigv[N]; + for (int i = 0; i < N; ++i) { + bigv[i] = time; + time.addDays(1); + } + // <== Break here. + // Expand bigv. + // This is expected to take up to a minute. + dummyStatement(&bigv); + } + + void testLongEvaluation2() + { + const int N = 10000; + int bigv[N]; + for (int i = 0; i < N; ++i) + bigv[i] = i; // <== Break here. // Expand bigv. // This is expected to take up to a minute. @@ -2725,7 +2740,8 @@ namespace basic { testStringWithNewline(); testMemoryView(); testColoredMemoryView(); - testLongEvaluation(); + testLongEvaluation1(); + testLongEvaluation2(); testFork(); testFunctionPointer(); }