aboutsummaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorhjk <hjk@theqtcompany.com>2016-04-12 11:43:13 +0200
committerhjk <hjk@theqtcompany.com>2016-04-12 12:08:39 +0000
commit3a7ce3f5be9af510634ae018e27d3b1a2970063a (patch)
tree05047936db6ee7529b200b4f8efd58f38f92f3e6 /share
parentc9b9be7e1933c5285bde8545fad4618e5cdd04a7 (diff)
Debugger: Restrict array dumping to 1 mio elements by default
Individual dumpers can override. User accessible gui to be done... Change-Id: Idf81dab11f810b43fc6721cbb37d12a1365a8634 Task-number: QTCREATORBUG-16021 Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Diffstat (limited to 'share')
-rw-r--r--share/qtcreator/debugger/dumper.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/share/qtcreator/debugger/dumper.py b/share/qtcreator/debugger/dumper.py
index a4f25df85c..cad3bed434 100644
--- a/share/qtcreator/debugger/dumper.py
+++ b/share/qtcreator/debugger/dumper.py
@@ -1558,6 +1558,9 @@ class DumperBase:
self.put('addrbase="0x%x",' % addrBase)
self.put('addrstep="0x%x",' % innerSize)
self.put('arrayencoding="%s",' % enc)
+ if n > maxNumChild:
+ self.put('childrenelided="%s",' % n) # FIXME: Act on that in frontend
+ n = maxNumChild
self.put('arraydata="')
self.put(self.readMemory(addrBase, n * innerSize))
self.put('",')
@@ -1574,7 +1577,10 @@ class DumperBase:
self.putArrayData(addr, n, self.lookupType(typeName))
self.putAddress(addr)
- def putPlotDataHelper(self, base, n, innerType):
+ def putPlotDataHelper(self, base, n, innerType, maxNumChild = 1000*1000):
+ if n > maxNumChild:
+ self.put('plotelided="%s",' % n) # FIXME: Act on that in frontend
+ n = maxNumChild
if self.currentItemFormat() == ArrayPlotFormat and self.isSimpleType(innerType):
enc = self.simpleEncoding(innerType)
if enc:
@@ -1582,10 +1588,10 @@ class DumperBase:
self.putField("editvalue", self.readMemory(base, n * innerType.sizeof))
self.putField("editformat", DisplayPlotData)
- def putPlotData(self, base, n, innerType):
- self.putPlotDataHelper(base, n, innerType)
+ def putPlotData(self, base, n, innerType, maxNumChild = 1000*1000):
+ self.putPlotDataHelper(base, n, innerType, maxNumChild=maxNumChild)
if self.isExpanded():
- self.putArrayData(base, n, innerType)
+ self.putArrayData(base, n, innerType, maxNumChild=maxNumChild)
def putSpecialArgv(self, value):
"""