forked from qt-creator/qt-creator
debugger: better guess at childnumchild value for compact transmission
Change-Id: I85626b75f49cdcb8f026ca0389e796fdca4d1f65 Reviewed-on: http://codereview.qt.nokia.com/3331 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: hjk <qthjk@ovi.com>
This commit is contained in:
@@ -340,9 +340,12 @@ class Children:
|
|||||||
self.addrBase = addrBase
|
self.addrBase = addrBase
|
||||||
self.addrStep = addrStep
|
self.addrStep = addrStep
|
||||||
self.printsAddress = True
|
self.printsAddress = True
|
||||||
if not childType is None:
|
if childType is None:
|
||||||
|
self.childType = None
|
||||||
|
else:
|
||||||
self.childType = stripClassTag(str(childType))
|
self.childType = stripClassTag(str(childType))
|
||||||
self.d.put('childtype="%s",' % self.childType)
|
self.d.put('childtype="%s",' % self.childType)
|
||||||
|
if childNumChild is None:
|
||||||
if isSimpleType(childType):
|
if isSimpleType(childType):
|
||||||
self.d.put('childnumchild="0",')
|
self.d.put('childnumchild="0",')
|
||||||
self.childNumChild = 0
|
self.childNumChild = 0
|
||||||
@@ -350,7 +353,8 @@ class Children:
|
|||||||
self.d.put('childnumchild="1",')
|
self.d.put('childnumchild="1",')
|
||||||
self.childNumChild = 1
|
self.childNumChild = 1
|
||||||
else:
|
else:
|
||||||
self.childType = None
|
self.d.put('childnumchild="%s",' % childNumChild)
|
||||||
|
self.childNumChild = childNumChild
|
||||||
try:
|
try:
|
||||||
if not addrBase is None and not addrStep is None:
|
if not addrBase is None and not addrStep is None:
|
||||||
self.d.put('addrbase="0x%x",' % long(addrBase))
|
self.d.put('addrbase="0x%x",' % long(addrBase))
|
||||||
|
@@ -2671,12 +2671,27 @@ namespace basic {
|
|||||||
dummyStatement(&a, &b, &c, &d);
|
dummyStatement(&a, &b, &c, &d);
|
||||||
}
|
}
|
||||||
|
|
||||||
void testLongEvaluation()
|
void testLongEvaluation1()
|
||||||
{
|
{
|
||||||
QDateTime time = QDateTime::currentDateTime();
|
QDateTime time = QDateTime::currentDateTime();
|
||||||
QVector<QDateTime> bigv;
|
const int N = 10000;
|
||||||
for (int i = 0; i < 10000; ++i)
|
QDateTime bigv[N];
|
||||||
bigv.append(time);
|
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.
|
// <== Break here.
|
||||||
// Expand bigv.
|
// Expand bigv.
|
||||||
// This is expected to take up to a minute.
|
// This is expected to take up to a minute.
|
||||||
@@ -2725,7 +2740,8 @@ namespace basic {
|
|||||||
testStringWithNewline();
|
testStringWithNewline();
|
||||||
testMemoryView();
|
testMemoryView();
|
||||||
testColoredMemoryView();
|
testColoredMemoryView();
|
||||||
testLongEvaluation();
|
testLongEvaluation1();
|
||||||
|
testLongEvaluation2();
|
||||||
testFork();
|
testFork();
|
||||||
testFunctionPointer();
|
testFunctionPointer();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user