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.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 childNumChild is None:
|
||||
if isSimpleType(childType):
|
||||
self.d.put('childnumchild="0",')
|
||||
self.childNumChild = 0
|
||||
@@ -350,7 +353,8 @@ class Children:
|
||||
self.d.put('childnumchild="1",')
|
||||
self.childNumChild = 1
|
||||
else:
|
||||
self.childType = None
|
||||
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))
|
||||
|
@@ -2671,12 +2671,27 @@ namespace basic {
|
||||
dummyStatement(&a, &b, &c, &d);
|
||||
}
|
||||
|
||||
void testLongEvaluation()
|
||||
void testLongEvaluation1()
|
||||
{
|
||||
QDateTime time = QDateTime::currentDateTime();
|
||||
QVector<QDateTime> 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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user