forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -1558,6 +1558,9 @@ class DumperBase:
|
|||||||
self.put('addrbase="0x%x",' % addrBase)
|
self.put('addrbase="0x%x",' % addrBase)
|
||||||
self.put('addrstep="0x%x",' % innerSize)
|
self.put('addrstep="0x%x",' % innerSize)
|
||||||
self.put('arrayencoding="%s",' % enc)
|
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('arraydata="')
|
||||||
self.put(self.readMemory(addrBase, n * innerSize))
|
self.put(self.readMemory(addrBase, n * innerSize))
|
||||||
self.put('",')
|
self.put('",')
|
||||||
@@ -1574,7 +1577,10 @@ class DumperBase:
|
|||||||
self.putArrayData(addr, n, self.lookupType(typeName))
|
self.putArrayData(addr, n, self.lookupType(typeName))
|
||||||
self.putAddress(addr)
|
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):
|
if self.currentItemFormat() == ArrayPlotFormat and self.isSimpleType(innerType):
|
||||||
enc = self.simpleEncoding(innerType)
|
enc = self.simpleEncoding(innerType)
|
||||||
if enc:
|
if enc:
|
||||||
@@ -1582,10 +1588,10 @@ class DumperBase:
|
|||||||
self.putField("editvalue", self.readMemory(base, n * innerType.sizeof))
|
self.putField("editvalue", self.readMemory(base, n * innerType.sizeof))
|
||||||
self.putField("editformat", DisplayPlotData)
|
self.putField("editformat", DisplayPlotData)
|
||||||
|
|
||||||
def putPlotData(self, base, n, innerType):
|
def putPlotData(self, base, n, innerType, maxNumChild = 1000*1000):
|
||||||
self.putPlotDataHelper(base, n, innerType)
|
self.putPlotDataHelper(base, n, innerType, maxNumChild=maxNumChild)
|
||||||
if self.isExpanded():
|
if self.isExpanded():
|
||||||
self.putArrayData(base, n, innerType)
|
self.putArrayData(base, n, innerType, maxNumChild=maxNumChild)
|
||||||
|
|
||||||
def putSpecialArgv(self, value):
|
def putSpecialArgv(self, value):
|
||||||
"""
|
"""
|
||||||
|
Reference in New Issue
Block a user